jest.config.yaml

Jest testing framework configuration.

Open in YAML Formatter

About this format

Jest configuration can be defined in YAML, controlling test finding, coverage reporting, and module mapping.

Example Data

preset: ts-jest
testEnvironment: node
collectCoverage: true
coverageDirectory: coverage
moduleNameMapper:
  "^@/(.*)$": "<rootDir>/src/$1"

When to use jest.config.yaml

  • Configuring unit testing
  • Setting up coverage reports
  • Mapping absolute path imports