-
Notifications
You must be signed in to change notification settings - Fork 569
Expand file tree
/
Copy pathjest.config.js
More file actions
38 lines (38 loc) · 1.32 KB
/
Copy pathjest.config.js
File metadata and controls
38 lines (38 loc) · 1.32 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
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
roots: ["<rootDir>/src", "<rootDir>/test"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
setupFilesAfterEnv: ["./test/setup.ts"],
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
"!src/**/*.d.ts",
"!src/**/vendor/**",
"!src/**/*.stories.{js,jsx,ts,tsx}",
],
transform: {
"\\.[jt]sx?$": "ts-jest",
},
moduleNameMapper: {
// Mocks
"^!!raw-loader!(.*)\\.css$": "<rootDir>/test/__mocks__/styleMock.js",
"^renderer/lib/api": "<rootDir>/test/__mocks__/apiMock.ts",
"^uuid$": "<rootDir>/test/__mocks__/uuid.ts",
// Event imports
"^../helpers/l10n$": "<rootDir>/src/shared/lib/lang/l10n.ts",
// Path aliases
consts: "<rootDir>/src/consts.ts",
"^store/(.*)$": "<rootDir>/src/store/$1",
"^components/(.*)$": "<rootDir>/src/components/$1",
"^lang/(.*)$": "<rootDir>/src/lang/$1",
"^lib/(.*)$": "<rootDir>/src/lib/$1",
"^ui(.*)$": "<rootDir>/src/components/ui/$1",
"^renderer(.*)$": "<rootDir>/src/renderer/$1",
"^shared(.*)$": "<rootDir>/src/shared/$1",
"^gbs-music-web/(.*)$": "<rootDir>/src/apps/gbs-music-web/$1",
"patrons.json": "<rootDir>/patrons.json",
"#my-quickjs-variant": require.resolve(
"@jitl/quickjs-singlefile-cjs-debug-sync",
),
},
};