jest.config.js•721 B
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.+(ts|tsx|js)', '**/*.(test|spec).+(ts|tsx|js)'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/**/*.test.{ts,tsx}',
'!src/**/__tests__/**',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html'],
// setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
testTimeout: 30000,
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json',
},
},
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
};