Closed AndyOGo closed 5 years ago
@AndyOGo thanks for the PR, please review and fix few issues.
@eugef Thanks for your quick review. I fixed them, please see my changes.
PS: some how I can't request a new review on Github
@eugef @howardabrams I made suggested changes, may I ask you to review again please? I'm looking forward to your feedback. Thank you.
@eugef @howardabrams hmh, I'm a bit confused. Just found existing implementations of this PR here: https://github.com/howardabrams/node-mocks-http/blob/master/lib/express/mock-request.js#L34-L53
Express is exported here, gues it was already working but was usage issue 🤔 https://github.com/howardabrams/node-mocks-http/blob/master/lib/http-mock.js#L34
Personally I never use express-specific mocks, so your PR is still relevant
Me neither, they aren't documented too. Glad my PR is still relevant.
But just recently I worked on .isXhr
#189 greped through this repo for .isXhr
and found all of it and more already implemented and exported as httpMocks.express
.
I couldn't find unit tests for it though 🤔
Definitely a lot of work has already been done for express
fixes #187 fixes #128