nuxt test
The test command runs tests using @nuxt/test-utils.
Terminal
npx nuxt test [ROOTDIR] [--cwd=<directory>] [--dev] [--watch]
The test command runs tests using @nuxt/test-utils. This command sets process.env.NODE_ENV to test if not already set.
Arguments
| Argument | Description |
|---|---|
ROOTDIR | The root directory of your Nuxt project (default: .) |
Options
| Option | Default | Description |
|---|---|---|
--cwd=<directory> | Specify the root directory of your Nuxt project | |
--dev | Run in dev mode | |
--watch | Watch mode |
This command sets
process.env.NODE_ENV to test.