Rename Jest config to .cjs and update .eslintignore

Renamed `jest.config.js` to `jest.config.cjs` for compatibility with CommonJS modules. Updated `.eslintignore` to exclude `.cjs` files to prevent linting issues.
This commit is contained in:
2024-08-14 21:26:39 +02:00
parent bc9376bce7
commit c1a4dc7bd0
2 changed files with 2 additions and 0 deletions

22
jest.config.cjs Normal file
View File

@@ -0,0 +1,22 @@
module.exports = {
setupFilesAfterEnv: ['./scripts/jest.setup.js'],
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.test.ts', '**/?(*.)+(test).ts'],
testPathIgnorePatterns: ['\\.spec\\.ts$', '\\.performance\\.test\\.ts$'],
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/src/$1',
},
collectCoverage: true,
coverageDirectory: '.locale/coverage',
coverageReporters: ['text', 'lcov'],
coverageThreshold: {
global: {
branches: 70,
functions: 70,
lines: 70,
statements: 70,
},
},
};