A / superagent-mocker

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

request.agent() is not patched #45

Open kornelski opened 7 years ago

kornelski commented 7 years ago

It's possible to make it work properly via subclassing — #44 — since the .agent() method will invoke superagent.Request.

A quick'n'dirty way of making it sort-of work (except cookies):

  superagent.agent = function() {
    return this;
  }