-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathjest.config.mjs
More file actions
42 lines (42 loc) · 1.29 KB
/
jest.config.mjs
File metadata and controls
42 lines (42 loc) · 1.29 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
/** @type {import('jest').Config} */
export default {
preset: "ts-jest",
testEnvironment: "node",
projects: [
{
displayName: "unit",
preset: "ts-jest",
testEnvironment: "node",
moduleNameMapper: {
"^(\.{1,2}/.*)\.js$": "$1",
},
roots: ["<rootDir>/tests"],
testPathIgnorePatterns: ["\.browser\.(spec|test)\.[jt]sx?$", "/tests/wire/"],
setupFilesAfterEnv: [],
},
{
displayName: "browser",
preset: "ts-jest",
testEnvironment: "<rootDir>/tests/BrowserTestEnvironment.ts",
moduleNameMapper: {
"^(\.{1,2}/.*)\.js$": "$1",
},
roots: ["<rootDir>/tests"],
testMatch: ["<rootDir>/tests/unit/**/?(*.)+(browser).(spec|test).[jt]s?(x)"],
setupFilesAfterEnv: [],
},
,
{
displayName: "wire",
preset: "ts-jest",
testEnvironment: "node",
moduleNameMapper: {
"^(\.{1,2}/.*)\.js$": "$1",
},
roots: ["<rootDir>/tests/wire"],
setupFilesAfterEnv: ["<rootDir>/tests/mock-server/setup.ts"],
},
],
workerThreads: false,
passWithNoTests: true,
};