// @ts-check const { defaults } = require('jest-config') /** * @type {import('./types').TsJestConfig} */ const tsJestConfig = { skipBabel: true, } /** * @type {Partial} */ const config = { rootDir: '..', transform: { '^.+\\.(ts|tsx)$': 'ts-jest', }, testMatch: [ '/src/**/__tests__/**/*.ts?(x)', '/src/**/?(*.)+(spec|test).ts?(x)', ], moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'], globals: { 'ts-jest': tsJestConfig, }, coverageThreshold: { global: { branches: 80, functions: 80, lines: 80, statements: 80, }, }, setupFiles: ['/config/setup-tests.js'], watchPlugins: [ 'jest-watch-typeahead/filename', 'jest-watch-typeahead/testname', ], } module.exports = config