eugef / node-mocks-http

Mock 'http' objects for testing Express routing functions
Other
755 stars 134 forks source link

req.subdomains is not defined #117

Closed tallytarik closed 4 years ago

tallytarik commented 7 years ago

Just wanted to start off by saying thanks for an awesome project! I've just started using this to test some middleware and I'm having some issues because req.subdomains isn't defined, and I'm testing some middleware that checks the current subdomain.

I've been having a browse and I can see in ./express/mock-request.js it looks like it's implemented the same way Express implements it, but it looks like this isn't used - would the subdomain property have to be added to ./mockRequest.js? Happy to submit a PR if I can be pointed in the right direction!

howardabrams commented 7 years ago

A PR would be great. Do you have personal test cases that expose this deficiency?

On Sun, Dec 4, 2016 at 11:02 PM, tallytarik notifications@github.com wrote:

Just wanted to start off by saying thanks for an awesome project! I've just started using this to test some middleware and I'm having some issues because req.subdomains isn't defined, and I'm testing some middleware that checks the current subdomain.

I've been having a browse and I can see in ./express/mock-request.js it looks like it's implemented the same way Express implements it, but it looks like this isn't used - would the subdomain property have to be added to ./mockRequest.js? Happy to submit a PR if I can be pointed in the right direction!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/howardabrams/node-mocks-http/issues/117, or mute the thread https://github.com/notifications/unsubscribe-auth/AAejjUHTELgWUD2Z_xSE8xEJMK_mHhPPks5rE7cfgaJpZM4LD6gp .

github-actions[bot] commented 4 years ago

Stale issue message