-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
End to End tests with Passport JWT #5522
Comments
Please provide a minimum reproduction repository. |
I started to work up a minimum reproduction repository and it kept working. I narrowed it down to this moduleDirectories line, which I'd added in my failing version:
|
Here's a repo that reproduces the problem: https://github.com/woodchuck/nestjs-issue-5522 |
@woodchuck Why do you change the I'm able to reproduce the problem, but if I use the property above without the |
Hi @jmcdo29. I wanted to reference imports in some areas of the code based on the root dir, rather than using a relative path. For instance, I like using
vs.
|
@jmcdo29 If you happen to use absolute imports, the below moduleDirectories config is necessary
|
@woodchuck @rungwe Gotcha. Well, by saying to import from
Which obviously does not have a
To solve this,you can use |
@jmcdo29 thanks a lot that solved the problem. The solution works perfectly |
@jmcdo29 Works for me too. Thanks! |
This resolved my issue as well. This approach is still working. |
I am struggling to implement e2e test. Outside test environment in production my application works well with passport, but as soon as I import the main module in my e2e tests, I am getting a strange error from
TypeError: passport.use is not a function
. I am using Passport JWT Strategy implementation. I cannot seem to get past thisBelow is what I am getting but in production everything works just fine.
@kamilmysliwiec I really appreciate your help
The text was updated successfully, but these errors were encountered: