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
Something seems off when using vitest; perhaps it needs to be added to the documentation. #3021
Comments
feel free to update the docs site at https://github.com/nestjs/docs.nestjs.com I'm not sure if we should mention that, tho. Because it's a configuration on Vitest side that you may not face depending on how your test suite looks like (I guess) |
My test suite was following classic nest instructions mentioned in docs. But my project was monorepo with pnpm workspaces. Still not sure if it is relative to this. |
Can you share a minimum reproduction? So we can decide better if the docs should be updated or not |
I will do it when I got off time. |
It appears this isn't directly tied to NestJS. However, if you manage to create a repository that shows the issue originating from Nest, please share the link here, and I'll reopen the issue. |
Is there an existing issue for this?
Current behavior
When I try to do e2e test of my AuthModule (with fastify adapter) via creating the test module with importing AppModule, I get nonsense Error: Nest can't resolve dependencies error. I did every solution exist in both github + stackoverflow but none of them worked.
Finally I found this thread in Discord.
When I installed the package and add to vite.config.ts as plugin, issue was resolved. I still have no idea why it worked but, I think it should be in docs as required package.
Minimum reproduction code
https://discord.com/channels/520622812742811698/1181664557693935677
Steps to reproduce
No response
Expected behavior
.
Package
@nestjs/common
@nestjs/core
@nestjs/microservices
@nestjs/platform-express
@nestjs/platform-fastify
@nestjs/platform-socket.io
@nestjs/platform-ws
@nestjs/testing
@nestjs/websockets
Other package
vitest
NestJS version
10.0.0
Packages versions
Node.js version
18.17.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: