@nrwl/vite:vitest

Generate a vitest setup for a project.

Usage

nx generate vitest ...

By default, Nx will search for vitest in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/vite:vitest ...

Show what will be generated without writing to disk:

nx g vitest ... --dry-run

Options

coverageProvider

string
Default: c8
Accepted values: c8, istanbul

Coverage provider to use.

inSourceTests

boolean
Default: false

Do not generate separate spec files and set up in-source testing

project

Required
string

The name of the project to test.

skipViteConfig

boolean
Default: false

Skip generating a vite config file

uiFramework

string
Default: none
Accepted values: react, none

UI framework to use with vitest