Timeout configuration includes: 1) Global testTimeout setting, 2) Individual test timeouts, 3) Async operation timeouts, 4) Setup/teardown timeouts, 5) Custom timeout messages. Default is usually 5000ms.
Globals configuration: 1) Define global variables, 2) Set up global mocks, 3) Configure global setup/teardown, 4) Define global matchers, 5) Set up global test utilities. Available throughout test suite.
TypeScript configuration includes: 1) Installing ts-jest, 2) Configuring transform with ts-jest, 3) Setting up tsconfig.json, 4) Configuring type checking, 5) Handling TypeScript paths and aliases.
Parallelization config includes: 1) maxWorkers setting, 2) Worker pool configuration, 3) Test file distribution, 4) Resource allocation, 5) Parallel run coordination.
Test filtering config: 1) testNamePattern settings, 2) Test file patterns, 3) Tag-based filtering, 4) Run group configuration, 5) Conditional test execution.
Custom runner implementation: 1) Runner API implementation, 2) Test execution flow, 3) Result reporting, 4) Resource management, 5) Integration with Jest infrastructure.
jest.config.js is the main configuration file that includes: 1) testEnvironment setting, 2) moduleFileExtensions, 3) setupFilesAfterEnv for setup files, 4) testMatch for test file patterns, 5) coverageThreshold settings, 6) transform configurations for preprocessors.
Test environment configuration includes: 1) Setting testEnvironment in config (jsdom/node), 2) Creating custom environments, 3) Configuring environment variables, 4) Setting up global mocks, 5) Handling environment-specific setup.
Transform configs handle: 1) File preprocessing before tests, 2) Babel integration for modern JavaScript, 3) TypeScript transformation, 4) Custom transformers for specific files, 5) Cache configuration for transforms.
Test pattern configuration uses: 1) testMatch for glob patterns, 2) testRegex for regex patterns, 3) testPathIgnorePatterns for exclusions, 4) File naming conventions (.test.js, .spec.js), 5) Directory organization patterns.
setupFilesAfterEnv: 1) Runs setup code after test framework initialization, 2) Configures global test setup, 3) Adds custom matchers, 4) Sets up test environment, 5) Configures global mocks. Example: ['./jest.setup.js']
Test data configuration: 1) Fixture setup locations, 2) Data loading strategies, 3) Cleanup mechanisms, 4) Data isolation approaches, 5) Shared test data management.