16 lines
469 B
JavaScript
16 lines
469 B
JavaScript
const { pathsToModuleNameMapper } = require('ts-jest');
|
|
const { compilerOptions } = require('./tsconfig');
|
|
|
|
module.exports = {
|
|
preset: 'ts-jest',
|
|
testEnvironment: 'jsdom',
|
|
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
|
|
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
|
|
testMatch: [
|
|
'**/__tests__/**/*.(ts|tsx|js)',
|
|
'**/*.(test|spec).(ts|tsx|js)',
|
|
],
|
|
transform: {
|
|
'^.+\\.(ts|tsx)$': 'ts-jest',
|
|
},
|
|
} |