Jest · Pipe
testEnvironment
Jest chooses where tests run. Node is the default; jsdom supplies browser APIs. Configure one environment for the project or select one file with a docblock.
Last updated
Syntax
testEnvironment: 'node' | 'jsdom' | '<environment-path>'
testEnvironmentOptions: {}
/** @jest-environment <environment-name> */In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
testEnvironmenttestEnvironmentOptionsNodeEnvironmentJSDOMEnvironment@jest/environment-jsdom-abstractcontext.docblockPragmashandleTestEvent