-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathjest.config.js
More file actions
45 lines (44 loc) · 1.22 KB
/
jest.config.js
File metadata and controls
45 lines (44 loc) · 1.22 KB
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
40
41
42
43
44
45
/* eslint-disable @typescript-eslint/no-var-requires */
const tsJestConfig = {
tsconfig: {
jsx: 'react-jsx',
allowJs: true,
target: 'es6',
lib: ['dom', 'esnext'],
module: 'esnext',
moduleResolution: 'nodenext',
skipLibCheck: true,
esModuleInterop: true,
noUnusedLocals: false,
noUnusedParameters: false,
},
}
module.exports = {
testEnvironment: 'jsdom',
transform: {
'^.+\\.[tj]sx?$': ['ts-jest', tsJestConfig],
},
setupFilesAfterEnv: ['./scripts/setupJestEnv.ts'],
verbose: false,
reporters: ['<rootDir>/scripts/failuresOnlyReporter.js', 'summary'],
forceExit: false,
bail: false,
globals: {
__DEV__: true,
__TEST__: true,
__VERSION__: require('./package.json').version,
__BROWSER__: false,
__GLOBAL__: false,
__ESM_BUNDLER__: true,
__ESM_BROWSER__: 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,
modulePathIgnorePatterns: ['<rootDir>/.claude/'],
testMatch: ['<rootDir>/packages/**/__tests__/**/*.test.[jt]s?(x)'],
}