2022-12-12 11:02:47 -05:00
|
|
|
const { pathsToModuleNameMapper } = require('ts-jest');
|
|
|
|
|
|
|
|
const { compilerOptions } = require('./tsconfig.base');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
preset: 'ts-jest',
|
|
|
|
transform: {
|
2023-01-24 11:44:08 -05:00
|
|
|
'\\.[jt]sx?$': ['ts-jest', { tsconfig: 'tsconfig.dev.json' }],
|
2022-12-12 11:02:47 -05:00
|
|
|
'^.+\\.svg$': './test/fileTransformer',
|
|
|
|
},
|
|
|
|
moduleNameMapper: {
|
|
|
|
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' }),
|
|
|
|
'\\.(css|less)$': '<rootDir>/src/__mocks__/styleMock.ts',
|
|
|
|
},
|
|
|
|
transformIgnorePatterns: [],
|
|
|
|
setupFiles: ['./test/setupEnv.js'],
|
|
|
|
testRegex: '\\.ispec\\.tsx?$',
|
|
|
|
};
|