mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
docs: advise correct extension for vitest config (#26845)
This commit is contained in:
parent
79b059aaf5
commit
ef1889f5e1
@ -59,6 +59,11 @@ We currently ship an environment for unit testing code that needs a [Nuxt](https
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
::tip
|
||||||
|
When importing `@nuxt/test-utils` in your vitest config, It is necessary to have `type: "module"` specified in your `package.json` or rename your vitest config file appropriatly.
|
||||||
|
> ie. `vitest.config.m{ts,js}`.
|
||||||
|
::
|
||||||
|
|
||||||
### Using a Nuxt Runtime Environment
|
### Using a Nuxt Runtime Environment
|
||||||
|
|
||||||
By default, `@nuxt/test-utils` will not change your default Vitest environment, so you can do fine-grained opt-in and run Nuxt tests together with other unit tests.
|
By default, `@nuxt/test-utils` will not change your default Vitest environment, so you can do fine-grained opt-in and run Nuxt tests together with other unit tests.
|
||||||
|
Loading…
Reference in New Issue
Block a user