Open MasonEast opened 3 years ago
I want to use expectbody, but it supports String, and I looked at your source code and it does:
expectbody
if (this.opts.expectBody && this.opts.expectBody !== resp.body) { return this.emit('mismatch', resp.body) }
The return body of my interface is an object. Your rules will very hard match. Why not use this:
if (this.opts.expectBody && !resp.body.includes(this.opts.expectBody)) { return this.emit('mismatch', resp.body) }
Would you like to send a Pull Request to address this issue? Remember to add unit tests.
Yes, it's my pleasure
Hello, I simply added assertions to autocannon. pr has been mentioned
I want to use
expectbody
, but it supports String, and I looked at your source code and it does:The return body of my interface is an object. Your rules will very hard match. Why not use this: