@nx/vite:vitest
Generate a Vitest setup for a project.
The State of JS survey is live, featuring a monorepo tools sectionThe State of JS survey is live, featuring a monorepo tools sectionVote for us
Generate a Vitest setup for a project.
1nx generate vitest ...
2By 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 ...
2Show what will be generated without writing to disk:
1nx g vitest ... --dry-run
2The name of the project to test.
v8v8, istanbul, customCoverage provider to use.
falseDo not generate separate spec files and set up in-source testing.
falseSkip 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-runtimeThe vitest environment to use. See https://vitest.dev/config/#environment.
nonereact, noneUI framework to use with vitest.
falseSkip formatting files.