A / superagent-mocker

Pretty simple in-browser mocks for CRUD and REST API
132 stars 32 forks source link

Cannot mock requests created with superagent constructor. #23

Open efegurkan opened 8 years ago

efegurkan commented 8 years ago

Cannot mock requests sent this way. superagent("POST", "/relative/url") .query() .send() .end()

mocking this is fine. superagent.post("relative/url") .query() .send()

Is there a way to mock request on constructor at the moment ?

Thanks,

volodymyrbalytskyy commented 5 years ago

I believe the answer is no. From the source code, only methods are mocked (patched), check this for loop.

josep687 commented 1 year ago

Image