-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (32 loc) · 906 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
/*
* @Author: baohua.kang [email protected]
* @Date: 2023-02-03 09:10:07
* @LastEditors: baohua.kang [email protected]
* @LastEditTime: 2023-02-12 10:59:01
*/
const { jsWithTs: tsjPreset } = require('ts-jest/presets')
module.exports = {
globals: {
'ts-jest': {
diagnostics: false,
tsconfig: 'tsconfig.test.json'
}
},
preset: 'ts-jest',
testEnvironment: 'node',
testTimeout: 60000,
transform: {
'^.+\\.tsx?$': 'ts-jest',
...tsjPreset.transform
},
transformIgnorePatterns: ['node_modules'],
coverageDirectory: 'coverage',
coverageReporters: ['html', 'lcov', 'text'],
collectCoverageFrom: ['packages/*/src/**/*.ts'],
watchPathIgnorePatterns: ['/node_modules/', '/dist/', '/.git/'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
moduleNameMapper: {
'^@codegen/(.*?)$': '<rootDir>/packages/$1/src'
},
rootDir: __dirname
}