eugef / node-mocks-http

Mock 'http' objects for testing Express routing functions
Other
753 stars 133 forks source link

fix: enable method chaining #191

Closed moolen closed 5 years ago

moolen commented 5 years ago

calling .send(), .json() and .jsonp() does not yield the response object but it should.

i.e. having a request handler which calls res.json({}).end() will fail.

This PR addresses this issue.

eugef commented 5 years ago

@moolen Thanks for your PR!