jest/config

Jest Configuration

Configure Jest settings

jest
config
settings

Command

module.exports = { testEnvironment: "node" }

Explanation

Jest configuration allows you to customize test environment, setup files, and other options.

Examples

Node environment

module.exports = { testEnvironment: "node" }

Setup files

module.exports = { setupFilesAfterEnv: ["<rootDir>/jest.setup.js"] }

Coverage collection

module.exports = { collectCoverageFrom: ["src/**/*.js"] }