bikk-uk / jest-mock-express

A lightweight Jest mock for unit testing Express
MIT License
49 stars 7 forks source link

res.write is not a function #68

Closed hshine1226 closed 2 years ago

hshine1226 commented 2 years ago
 expect(res.write).toBeCalled() // TypeError: res.write is not a function
aboyce commented 2 years ago

This looks like it comes from me not diving deep enough into the Response to ensure everything is there.

I've created new issues to fully add in the properties and functions for:

Thanks for raising the issue 👍 I'll track the work against those two tickets (they are linked now so you can get updates) as I'd rather implement all the missing properties in one rather than patching in certain ones. It will also have to be done after the next major release otherwise merging it all back in will be problematic. Apologies for the delay caused by this.