-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjest.config.js
39 lines (39 loc) · 1.06 KB
/
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
34
35
36
37
38
39
module.exports = {
testEnvironment: 'jsdom',
preset: 'ts-jest/presets/js-with-ts',
setupFilesAfterEnv: ['./scripts/setupJestEnv.ts'],
verbose: true,
forceExit: false,
bail: false,
globals: {
__DEV__: true,
__TEST__: true,
__VERSION__: require('./package.json').version,
__BROWSER__: false,
__GLOBAL__: false,
__ESM_BUNDLER__: true,
__ESM_BROWSER__: false,
'ts-jest': {
tsconfig: {
jsx: 'react',
allowJs: true,
target: 'es6',
lib: ['dom', 'esnext'],
module: 'esnext',
moduleResolution: 'nodenext',
skipLibCheck: true,
esModuleInterop: true,
noUnusedLocals: false,
noUnusedParameters: false,
},
},
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
moduleNameMapper: {
'^doura$': '<rootDir>/packages/doura/src',
'^doura-(.*?)$': '<rootDir>/packages/doura-$1/src',
'^react-doura$': '<rootDir>/packages/react-doura/src',
},
rootDir: __dirname,
testMatch: ['<rootDir>/packages/**/__tests__/**/*.test.[jt]s?(x)'],
}