-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathjest.config.js
More file actions
51 lines (51 loc) · 1.53 KB
/
jest.config.js
File metadata and controls
51 lines (51 loc) · 1.53 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
46
47
48
49
50
51
export default {
preset: "ts-jest",
testEnvironment: "node",
extensionsToTreatAsEsm: [".ts"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
"\\.css\\?inline$": "<rootDir>/tests/__mocks__/css-inline.js",
"^@shotstack/shotstack-studio/schema$": "<rootDir>/dist/schema/index.cjs",
"^@core/(.*)$": "<rootDir>/src/core/$1",
"^@canvas/(.*)$": "<rootDir>/src/components/canvas/$1",
"^@timeline/(.*)$": "<rootDir>/src/components/timeline/$1",
"^@shared/(.*)$": "<rootDir>/src/core/shared/$1",
"^@schemas$": "<rootDir>/src/core/schemas/index.ts",
"^@schemas/(.*)$": "<rootDir>/src/core/schemas/$1",
"^@timing/(.*)$": "<rootDir>/src/core/timing/$1",
"^@layouts/(.*)$": "<rootDir>/src/core/layouts/$1",
"^@animations/(.*)$": "<rootDir>/src/core/animations/$1",
"^@events/(.*)$": "<rootDir>/src/core/events/$1",
"^@inputs/(.*)$": "<rootDir>/src/core/inputs/$1",
"^@loaders/(.*)$": "<rootDir>/src/core/loaders/$1",
"^@export/(.*)$": "<rootDir>/src/core/export/$1",
"^@styles/(.*)$": "<rootDir>/src/styles/$1",
"^@templates/(.*)$": "<rootDir>/src/templates/$1"
},
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
tsconfig: "tsconfig.test.json"
}
]
},
collectCoverageFrom: [
"src/**/*.ts",
"!src/**/*.d.ts",
"!src/**/index.ts",
"!src/styles/**"
],
coverageDirectory: "coverage",
coverageReporters: ["text", "text-summary", "lcov"],
coverageThreshold: {
global: {
branches: 20,
functions: 25,
lines: 25,
statements: 25
}
}
};