-
-
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
Invalid Characters in Path #3780
Comments
@SimonSimCity you can set these import { defineVitestConfig } from "nuxt-vitest/config";
+import { coverageConfigDefaults } from "vitest/config";
export default defineVitestConfig({
test: {
environment: "nuxt",
+ coverage: {
+ exclude: [...coverageConfigDefaults.exclude, "**/virtual:nuxt:/**"],
+ },
},
}); Maybe Vitest should add |
I don't know how those file paths are formed, but I found some reference in the package nuxt has:
Maybe the correct place to continue from here is to take the libraries individually..? It seems like |
@AriPerkkio As I was pointed to on the Nuxt Discord: This is in fact convention by vite: https://vitejs.dev/guide/api-plugin.html#virtual-modules-convention I don't know whether the code actually can be made visible, but the colons in the file-name are not good. Maybe good to add this to the default config of vitest, if the code cannot be seen anyways, but could also be worth to include this in the coverage report for some modules, I don't know ... |
Thanks for looking into this @SimonSimCity. As the |
Describe the bug
I have a nuxt project, where I had the same problem as described in #3013. I've tried to create a minimal example of how to reproduce this. The output is:
Reproduction
https://github.com/SimonSimCity/vitest-invalid-coverage-path
Run the pnpm commands
pnpm install
, followed bypnpm coverage
.System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: