/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['src'],
testMatch: [
'**/__tests__/**/*.test.ts',
'**/?(*.)+(spec|test).ts'
],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: {
module: 'commonjs',
moduleResolution: 'node',
esModuleInterop: true,
allowSyntheticDefaultImports: true,
strict: true,
skipLibCheck: true
}
}]
},
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},
testPathIgnorePatterns: ['/node_modules/'],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.test.ts',
'!src/__tests__/**'
]
};