-
Notifications
You must be signed in to change notification settings - Fork 13
/
jest.config.js
43 lines (43 loc) · 1.43 KB
/
jest.config.js
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
module.exports = {
projects: [
{
displayName: 'Node',
coverageDirectory: "coverage",
coveragePathIgnorePatterns: ["node_modules/", "dist/"],
moduleDirectories: ["node_modules"],
moduleFileExtensions: ["ts", "js"],
testEnvironment: "node",
testMatch: ["<rootDir>/packages/**/*.test.ts"],
testPathIgnorePatterns: ["/node_modules/", "/dist/", "/packages/browser/", "/packages/edge/"],
transform: {
"^.+\\.ts$": ["ts-jest", "tsconfig.json"]
},
},
{
displayName: 'Browser',
coverageDirectory: "coverage",
coveragePathIgnorePatterns: ["node_modules/", "dist/"],
moduleDirectories: ["node_modules"],
moduleFileExtensions: ["ts", "js"],
testEnvironment: "jsdom",
testMatch: ["<rootDir>/packages/browser/**/*.test.ts"],
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
transform: {
"^.+\\.ts$": ["ts-jest", "tsconfig.json"]
},
},
{
displayName: 'Edge',
coverageDirectory: "coverage",
coveragePathIgnorePatterns: ["node_modules/", "dist/"],
moduleDirectories: ["node_modules"],
moduleFileExtensions: ["ts", "js"],
testEnvironment: "@edge-runtime/jest-environment",
testMatch: ["<rootDir>/packages/edge/**/*.test.ts"],
testPathIgnorePatterns: ["/node_modules/", "/dist/"],
transform: {
"^.+\\.ts$": ["ts-jest", "tsconfig.json"]
},
},
]
};