37 lines
672 B
JavaScript
37 lines
672 B
JavaScript
/** @type {import('jest').Config} */
|
|
const config = {
|
|
preset: 'ts-jest',
|
|
transform: {
|
|
'^.+\\.ts?$': [
|
|
'ts-jest',
|
|
{
|
|
tsconfig: 'tsconfig.jest.json',
|
|
diagnostics: {
|
|
ignoreCodes: [151002],
|
|
},
|
|
},
|
|
],
|
|
},
|
|
moduleNameMapper: {
|
|
'^(\\.{1,2}/.*)\\.js$': '$1',
|
|
},
|
|
modulePathIgnorePatterns: ['<rootDir>/dist/'],
|
|
collectCoverage: true,
|
|
collectCoverageFrom: [
|
|
'lib/**/*.ts',
|
|
'!lib/**/*.d.ts',
|
|
'!lib/xmllint.ts',
|
|
'!node_modules/',
|
|
],
|
|
coverageThreshold: {
|
|
global: {
|
|
branches: 80,
|
|
functions: 90,
|
|
lines: 90,
|
|
statements: 90,
|
|
},
|
|
},
|
|
};
|
|
|
|
module.exports = config;
|