jest.config.js•826 B
/** @type {import('ts-jest').JestConfigWithTsJest} */
export default {
preset: 'ts-jest',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
},
],
},
testTimeout: 30000,
maxWorkers: 1,
forceExit: true,
detectOpenHandles: true,
setupFilesAfterEnv: ['<rootDir>/src/__tests__/test-setup.ts'],
testPathIgnorePatterns: [
'<rootDir>/build/',
'<rootDir>/node_modules/',
'<rootDir>/src/__tests__/test-setup.ts',
'<rootDir>/src/__tests__/integration.test.ts'
],
testMatch: [
'<rootDir>/src/**/*.test.ts'
],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.test.ts',
'!src/__tests__/**',
'!src/index.ts'
]
};