@nx/vite:vitest
Generate a Vitest setup for a project.
Monorepo World: October 7, 2024Monorepo World: October 7, 2024Join us!
Generate a Vitest setup for a project.
1nx generate vitest ...
2
By default, Nx will search for vitest
in the default collection provisioned in workspace.json.
You can specify the collection explicitly as follows:
1nx g @nx/vite:vitest ...
2
Show what will be generated without writing to disk:
1nx g vitest ... --dry-run
2
The name of the project to test.
v8
v8
, istanbul
, custom
Coverage provider to use.
babel
babel
, swc
The compiler to use
false
Do not generate separate spec files and set up in-source testing.
The name of the project's tsconfig file that includes the runtime source files. If not provided, it will default to tsconfig.lib.json
for libraries and tsconfig.app.json
for applications.
false
Skip generating a vite config file.
The test target of the project to be transformed to use the @nx/vite:test executor.
node
, jsdom
, happy-dom
, edge-runtime
The vitest environment to use. See https://vitest.dev/config/#environment.
none
react
, none
UI framework to use with vitest.
false
Skip formatting files.
Join us live for exciting talks on developer tooling and monorepos! Catch the action on YouTube and join the conversation on Discord!