Open AlbertBrand opened 8 months ago
https://stackblitz.com/edit/github-3etpwp?file=package.json
If you have test files in your pages folder importing @nuxt/test-utils/runtime, the following error pops up when starting the project
pages
@nuxt/test-utils/runtime
ERROR This module cannot be imported in the Vue part of your app. [importing @nuxt/test-utils/runtime from pages/<testname>.ts]
The error does not seem to have effect on the app startup itself (it's probably more a warning).
The error goes away when moving the test out of the pages folder.
No response
It seems that .nuxtignore can be used to avoid this. https://nuxt.com/docs/guide/directory-structure/nuxtignore
.nuxtignore
// .nuxtignore pages/*.nuxt.spec.ts
Environment
Reproduction
https://stackblitz.com/edit/github-3etpwp?file=package.json
Describe the bug
If you have test files in your
pages
folder importing@nuxt/test-utils/runtime
, the following error pops up when starting the projectThe error does not seem to have effect on the app startup itself (it's probably more a warning).
The error goes away when moving the test out of the
pages
folder.Additional context
No response
Logs
No response