@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
false
Use babel-jest
instead of ts-jest
(Deprecated: Use --compiler=babel
instead).
compiler
tsc
tsc
, babel
, swc
The compiler to use for source and tests.
js
false
Use JavaScript instead of TypeScript for config files
project
The name of the project.
skipSetupFile
false
[Deprecated]: Skips the setup file required for angular. (Use --setup-file
)
setupFile
none
none
, angular
, web-components
The setup file to be generated.
skipSerializers
false
Skips the serializers required to snapshot angular templates.
supportTsx
false
Setup tsx
support.
skipFormat
false
Skip formatting files
skipPackageJson
false
Do not add dependencies to package.json
.
testEnvironment
jsdom
jsdom
, node
The test environment for jest.