-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathjest.config.js
33 lines (30 loc) · 862 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// eslint-disable-next-line @typescript-eslint/no-var-requires
const { defaults } = require('ts-jest/presets');
const configs = {
...defaults,
verbose: true,
globals: {
'ts-jest': {
babelConfig: 'babel.config.js',
// babelConfig: 'babelrc.test.json',
tsconfig: 'tsconfig.jest.json',
diagnostics: false,
},
},
moduleNameMapper: {
'^@asuna-admin/(.*)$': '<rootDir>/src/$1',
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
},
// moduleFileExtensions: ['js', 'jsx', 'json', 'ts', 'tsx'],
// moduleDirectories: ['node_modules', 'src'],
testRegex: '.spec.tsx?$',
// transform: {
// '^.+\\.(t|j)sx?$': 'ts-jest',
// // '^.+\\.js?$': 'babel-jest',
// },
// coverageThreshold: { global: {} },
collectCoverage: true,
preset: 'ts-jest',
};
console.log(configs);
module.exports = configs;