You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
826 B
22 lines
826 B
const { pathsToModuleNameMapper } = require('ts-jest/utils'); |
|
// In the following statement, replace `./tsconfig` with the path to your `tsconfig` file |
|
// which contains the path mapping (ie the `compilerOptions.paths` option): |
|
const { jsonc } = require('jsonc'); |
|
const { readFileSync } = require('fs'); |
|
|
|
const { compilerOptions } = jsonc.parse(readFileSync('./tsconfig.json', { encoding: 'utf8' })); |
|
|
|
module.exports = { |
|
transform: { |
|
'^.+\\.tsx?$': 'ts-jest', |
|
}, |
|
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$', |
|
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'], |
|
testEnvironment: './config/jest.environment.js', |
|
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { |
|
prefix: '<rootDir>', |
|
}), |
|
globals: { |
|
DecCst: false, |
|
}, |
|
};
|
|
|