-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
35 lines (34 loc) · 1.13 KB
/
jest.config.ts
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
34
35
export default {
// Automatically clear mock calls, instances, contexts and results before every test
clearMocks: true,
testEnvironment: 'node',
// Indicates which provider should be used to instrument code for coverage
coverageProvider: 'v8',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
moduleFileExtensions: [
'ts',
'js',
],
transformIgnorePatterns: [],
transform: {
"^.+\\.(t|j)s?$": "@swc/jest",
},
setupFiles: ['<rootDir>/src/setup-tests.ts'],
errorOnDeprecated: true,
fakeTimers: {
enableGlobally: true,
},
maxWorkers: '50%',
// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: ['node_modules'],
notify: true,
notifyMode: 'failure-change',
rootDir: '.',
// The glob patterns Jest uses to detect test files
testMatch: ['**/?(*.)+(spec|test).ts'],
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
testPathIgnorePatterns: ['/node_modules/'],
}