Schema for internal use only

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

@nrwl/jest:jest-project

Add Jest Configuration to a project.

Usage

nx generate jest-project ...

By default, Nx will search for jest-project in the default collection provisioned in workspace.json.

You can specify the collection explicitly as follows:

nx g @nrwl/jest:jest-project ...

Show what will be generated without writing to disk:

nx g jest-project ... --dry-run

Options

babelJest

babel-jestDeprecated
boolean
Default: false

Use babel-jest instead of ts-jest (Deprecated: Use --compiler=babel instead).

true

compiler

string
Default: tsc
Accepted values: tsc, babel, swc

The compiler to use for source and tests.

js

boolean
Default: false

Use JavaScript instead of TypeScript for config files

project

string

The name of the project.

skipSetupFile

Deprecated
boolean
Default: false

[Deprecated]: Skips the setup file required for angular. (Use --setup-file)

true

setupFile

string
Default: none
Accepted values: none, angular, web-components

The setup file to be generated.

skipSerializers

boolean
Default: false

Skips the serializers required to snapshot angular templates.

supportTsx

boolean
Default: false

Setup tsx support.

skipFormat

boolean
Default: false

Skip formatting files

skipPackageJson

boolean
Default: false

Do not add dependencies to package.json.

testEnvironment

string
Default: jsdom
Accepted values: jsdom, node

The test environment for jest.