diff --git a/jest.config.cjs b/jest.config.cjs index 83ebe7bd254..e4c96f43c77 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -1,14 +1,12 @@ +const { createJsWithTsEsmPreset } = require('ts-jest'); + module.exports = { + ...createJsWithTsEsmPreset(), verbose: true, collectCoverage: true, coverageReporters: ['text', 'lcov', 'json-summary'], coverageDirectory: 'coverage', collectCoverageFrom: ['scripts/**/*.ts'], coveragePathIgnorePatterns: ['scripts/compose.ts', 'scripts/tools/categorylist.ts', 'scripts/tools/tags-color.ts'], - testMatch: ['**/tests/**/*.test.*', '!**/netlify/**/*.test.*'], - transform: { - '^.+\\.tsx?$': ['ts-jest', {}], - '^.+\\.json$': ['ts-jest', { useESM: true }] - }, - extensionsToTreatAsEsm: ['.ts', '.tsx'] + testMatch: ['**/tests/**/*.test.*', '!**/netlify/**/*.test.*'] };