-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Incorrect test results on *first* run after installing node_modules #6387
Comments
There should be no For now, you can add them to your config manually: export default defineConfig({
optimizeDeps: {
include: ['react/jsx-dev-runtime'],
exclude: ['@vitest/coverage-istanbul'],
}
}) |
I guess this doesn't show up in our own tests or ecosystem ci due to locally linked packages. It would be great to be able to replicate this issue in our tests at least. 🤔 |
The We also now print the warning that Vitest doesn't expect dependencies to be optimized. Regarding react - please, use |
Describe the bug
Using browser mode and either v8 or istanbul coverage, the test run fails the first time after installing node_modules with error
Failed to fetch dynamically imported module: http://localhost:5173/@id/@vitest/coverage-v8/browser?import
. This is currently blocking me from upgrading because tests fail 100% of the time in CI since it's a fresh node_modules.AFAICT, this was introduced in 2.1.0-beta.1. It works fine in 2.0.5, but look at how basic.test.tsx gets run twice (see below)
Reproduction
branch: https://github.com/kwojcik/vitestsourcemapbug/tree/coverageCrashRepro
System Info
The text was updated successfully, but these errors were encountered: