2022-01-31 20:28:38 +01:00
|
|
|
export default {
|
|
|
|
collectCoverage: true,
|
|
|
|
collectCoverageFrom: [
|
|
|
|
'js/**/*.{js,ts}',
|
|
|
|
],
|
|
|
|
coveragePathIgnorePatterns: [
|
|
|
|
'/node_modules/',
|
|
|
|
'/.*\\.test\\.ts$',
|
|
|
|
'.*\\.d\\.ts$',
|
|
|
|
],
|
|
|
|
coverageDirectory: '<rootDir>/coverage/',
|
|
|
|
coverageThreshold: {
|
|
|
|
global: {
|
|
|
|
statements: 0,
|
|
|
|
branches: 0,
|
|
|
|
functions: 0,
|
|
|
|
lines: 0,
|
|
|
|
},
|
2022-03-26 00:44:28 +01:00
|
|
|
'./js/utils/**/*.ts': {
|
2022-01-31 20:28:38 +01:00
|
|
|
statements: 100,
|
|
|
|
branches: 100,
|
|
|
|
functions: 100,
|
|
|
|
lines: 100,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
preset: 'ts-jest/presets/js-with-ts-esm',
|
|
|
|
setupFilesAfterEnv: ['<rootDir>/test/jest-setup.ts'],
|
|
|
|
testEnvironment: 'jsdom',
|
|
|
|
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
|
|
|
|
moduleNameMapper: {
|
|
|
|
'./js/(.*)': '<rootDir>/js/$1',
|
|
|
|
},
|
2024-04-15 14:38:31 +02:00
|
|
|
transform: {
|
|
|
|
'^.+\\.tsx?$': ['ts-jest', {
|
2022-01-31 20:28:38 +01:00
|
|
|
tsconfig: '<rootDir>/tsconfig.json',
|
|
|
|
useESM: true,
|
2024-04-15 14:38:31 +02:00
|
|
|
}]
|
2022-01-31 20:28:38 +01:00
|
|
|
},
|
2024-04-15 14:38:31 +02:00
|
|
|
globals: {
|
|
|
|
extensionsToTreatAsEsm: ['.ts', '.js'],
|
|
|
|
}
|
2022-01-31 20:28:38 +01:00
|
|
|
};
|