superagent-mocker
superagent-mocker copied to clipboard
Add mock status code
for example, mock status code = 404
Nice idea. I'll try to hack it.
I think, I can reuse some things from superagent.Response
constructor to provide same API. But it's looks like the new major version 'cause it will break current API. But I think, that this is the right way. Give me some additional time please.
I think I've got something workable (works for my tests): https://github.com/ebsco/superagent-mocker/tree/mockable-status-codes
@LeopoldoFu Super! Could you make pull request?
@LeopoldoFu :+1: to a pull request to support this