forked from DimensionDev/Maskbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.ts
30 lines (28 loc) · 879 Bytes
/
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
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
import type { InitialOptionsTsJest } from 'ts-jest/dist/types'
import { defaultsESM as tsjPreset } from 'ts-jest/presets'
Error.stackTraceLimit = Infinity
const config: InitialOptionsTsJest = {
transform: {
...tsjPreset.transform,
},
globals: {
'ts-jest': {
useESM: true,
isolatedModules: true,
},
},
cacheDirectory: './node_modules/.cache/jest/',
clearMocks: true,
coverageProvider: 'v8',
testMatch: ['**/tests/**/*.[jt]s?(x)'],
extensionsToTreatAsEsm: ['.ts', '.tsx'],
moduleNameMapper: {
'@masknet/shared-base': '<rootDir>/packages/shared-base/src/index.ts',
},
snapshotSerializers: ['@masknet/serializer'],
}
export default config