- 
                Notifications
    
You must be signed in to change notification settings  - Fork 103
 
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the feature
Unit testing (e.g. [parts of ]composables or server functions) doesn't require a full built of nuxt.
Originally posted by @pi0 in vitest-dev/vitest#2044 (comment)
We plan to support also unit testing with
nuxi testbut properly in a Nuxt environment. Exposing vite config only is not enough for doing that and in past similar approach made lots of headaches for testing in Nuxt 2. However, probably will expose as a@nuxt/kitutility anyway as an alternative to current usage that needs replicating vite config for aliases.
### Tasks
- [x] use `nuxt-vitest` internally whilst improving test suite + fixing issues
- [x] link to `nuxt-vitest` and improve its docs
- [x] merge `nuxt-vitest` into `@nuxt/test-utils`
Related: https://github.com/nuxt/nuxt.js/issues/13077 (auto-import issues when testing components)
issue description from nuxt/nuxt#14972 - @tobiasdiez
hareku, BracketJohn, stilesdev, lucavenir, dKab and 14 moremitraecpdidavid61202, JessicaSachs, yuya-okada527, pitcher-maarten, SimonSimCity and 1 morecavias, yuya-okada527, maxdzin and DevDengChao
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request