Skip to content

Commit

Permalink
refactor: simplify Jest configuration by utilizing ts-jest preset and…
Browse files Browse the repository at this point in the history
… removing unnecessary transform settings
  • Loading branch information
JeelRajodiya committed Jan 1, 2025
1 parent beb787e commit 1bb48b6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -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.*']
};

0 comments on commit 1bb48b6

Please sign in to comment.