Schema for internal use only

Please do not extend this schema as it is part of Nx internal usage.

@nx/jest:init

Add Jest Configuration to a workspace.

Usage

nx generate init ...
nx g ng-add ... #same

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

You can specify the collection explicitly as follows:

Show what will be generated without writing to disk:

nx g init ... --dry-run

Options

testEnvironment

string
Default: jsdom
Accepted values: jsdom, node, none

The test environment for jest. This controls which jest-environment-* package is installed

babelJest

babel-jest
boolean
Default: false

Use babel-jest instead of ts-jest.

js

boolean
Default: false

Use JavaScript instead of TypeScript for config files

rootProject

Hidden
boolean
Default: false

initialize Jest for an application at the root of the workspace

skipPackageJson

boolean
Default: false

Do not add dependencies to package.json.