-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.json
29 lines (29 loc) · 1.28 KB
/
jest.config.json
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
{
"setupTestFrameworkScriptFile": "<rootDir>/src/tests/setupTests.ts",
"collectCoverageFrom": ["src/**/*.{js,jsx,ts,tsx}", "!src/**/*.d.ts"],
"setupFiles": ["<rootDir>/config/polyfills.js"],
"testMatch": ["<rootDir>/src/tests/**/?(*.)(spec|test).(j|t)s?(x)", "<rootDir>/src/**/?(*.)(spec|test).(j|t)s?(x)"],
"testURL": "http://localhost",
"transform": {
"^.+\\.(js|jsx|mjs)$": "<rootDir>/node_modules/babel-jest",
"^.+\\.tsx?$": "<rootDir>/config/jest/typescriptTransform.js",
"^.+\\.p?css$": "<rootDir>/config/jest/cssTransform.js",
"^(?!.*\\.(js|jsx|mjs|css|json)$)": "<rootDir>/config/jest/fileTransform.js"
},
"transformIgnorePatterns": ["[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|ts|tsx)$"],
"moduleNameMapper": {
"^react-native$": "react-native-web",
"^@/db$": "<rootDir>/src/tests/mocks/db",
"^@/utils/settings": "<rootDir>/src/tests/mocks/settings",
"^@/(.*)$": "<rootDir>/src/$1",
"^worker-loader!@/(.*)$": "<rootDir>/src/$1",
"electron": "<rootDir>/src/tests/mocks/electron"
},
"modulePathIgnorePatterns": ["<rootDir>/src/__test__/e2e"],
"moduleFileExtensions": ["web.ts", "ts", "web.tsx", "tsx", "web.js", "js", "web.jsx", "jsx", "json", "node", "mjs"],
"globals": {
"ts-jest": {
"tsConfig": "./tsconfig.test.json"
}
}
}