New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The problem with the mock #19
Comments
I've merged #18, thanks! Is |
Could we create a mock request as |
I like your idea of using |
It must be |
I could use |
It works for me. Do I get it right that passport.js uses your mock req everywhere, including the callback ( |
Thanks for testing!
Yes |
Koa generally keeps I'd suggest to inherit from |
I am fine with inheriting from In general, the decision is: where to expect user added properties/method. In the |
I submitted the PR to turn to |
Please close the issue when you publish the new version, I'll replace my branch with it. |
@iliakan could you provide a working mocking sample? |
@mfornasa What you mean? |
req, connection
property addressed by PR Update request.js #18req
when passed by passport. Maybe a foreach loop or an additional configuration will do.The use case: I have
req.log
method which logs with request information (so I know the context). I also usepassReqToCallback: true
in strategies to have thereq
object (to log it and to merge profiles).With the new koa-passport,
req.log
is undefined, so the project dies.The text was updated successfully, but these errors were encountered: