superagent-mocker icon indicating copy to clipboard operation
superagent-mocker copied to clipboard

Add mock status code

Open khmelevskii opened this issue 9 years ago • 5 comments

for example, mock status code = 404

khmelevskii avatar Aug 07 '15 22:08 khmelevskii

Nice idea. I'll try to hack it.

A avatar Aug 09 '15 21:08 A

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.

A avatar Aug 10 '15 20:08 A

I think I've got something workable (works for my tests): https://github.com/ebsco/superagent-mocker/tree/mockable-status-codes

LeopoldoFu avatar Feb 05 '16 20:02 LeopoldoFu

@LeopoldoFu Super! Could you make pull request?

A avatar Feb 11 '16 14:02 A

@LeopoldoFu :+1: to a pull request to support this

lobobabysaurus avatar Feb 29 '16 04:02 lobobabysaurus