forked from remix-run/remix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
101 lines (101 loc) · 3.49 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
module.exports = {
modulePathIgnorePatterns: ["<rootDir>/examples", "<rootDir>/.tmp"],
projects: [
{
displayName: "create-remix",
testEnvironment: "node",
testMatch: ["<rootDir>/packages/create-remix/**/*-test.[jt]s?(x)"],
globalSetup: "<rootDir>/jest/buildRemix.ts",
setupFilesAfterEnv: [
"<rootDir>/packages/create-remix/__tests__/setupAfterEnv.ts",
],
},
{
displayName: "integration",
testEnvironment: "node",
testMatch: ["<rootDir>/integration/**/*-test.[jt]s?(x)"],
globalSetup: "<rootDir>/integration/helpers/global-setup.ts",
setupFilesAfterEnv: [
"<rootDir>/packages/create-remix/__tests__/setupAfterEnv.ts",
],
},
{
displayName: "remix-architect",
testEnvironment: "node",
testMatch: ["<rootDir>/packages/remix-architect/**/*-test.[jt]s?(x)"],
setupFiles: ["<rootDir>/packages/remix-architect/__tests__/setup.ts"],
},
{
displayName: "remix-deno",
testEnvironment: "jsdom",
testMatch: ["<rootDir>/packages/remix-deno/**/*-test.[jt]s?(x)"],
moduleNameMapper: {
"https://deno.land/std/path/mod.ts":
"<rootDir>/packages/remix-deno/__tests__/pathMock.ts",
},
setupFiles: ["<rootDir>/packages/remix-deno/__tests__/setup.ts"],
},
{
displayName: "remix-dev",
testEnvironment: "node",
testMatch: ["<rootDir>/packages/remix-dev/**/*-test.[jt]s?(x)"],
},
{
displayName: "remix-express",
testEnvironment: "node",
testMatch: ["<rootDir>/packages/remix-express/**/*-test.[jt]s?(x)"],
setupFiles: ["<rootDir>/packages/remix-express/__tests__/setup.ts"],
},
{
displayName: "remix-netlify",
testEnvironment: "node",
testMatch: ["<rootDir>/packages/remix-netlify/**/*-test.[jt]s?(x)"],
setupFiles: ["<rootDir>/packages/remix-netlify/__tests__/setup.ts"],
},
{
displayName: "remix-node",
testEnvironment: "node",
testMatch: ["<rootDir>/packages/remix-node/**/*-test.[jt]s?(x)"],
setupFiles: ["<rootDir>/packages/remix-node/__tests__/setup.ts"],
},
{
displayName: "remix-react",
testEnvironment: "jsdom",
testMatch: ["<rootDir>/packages/remix-react/**/*-test.[jt]s?(x)"],
setupFiles: ["<rootDir>/packages/remix-react/__tests__/setup.ts"],
},
{
displayName: "remix-server-runtime",
testEnvironment: "node",
testMatch: [
"<rootDir>/packages/remix-server-runtime/**/*-test.[jt]s?(x)",
],
setupFiles: [
"<rootDir>/packages/remix-server-runtime/__tests__/setup.ts",
],
},
{
displayName: "remix-vercel",
testEnvironment: "node",
testMatch: ["<rootDir>/packages/remix-vercel/**/*-test.[jt]s?(x)"],
setupFiles: ["<rootDir>/packages/remix-vercel/__tests__/setup.ts"],
},
// Fixture Apps
{
displayName: "gists-app",
testEnvironment: "node",
testMatch: ["<rootDir>/fixtures/gists-app/**/*-test.[jt]s?(x)"],
globalSetup: "<rootDir>/fixtures/gists-app/jest/globalSetup.ts",
globalTeardown: "<rootDir>/fixtures/gists-app/jest/globalTeardown.ts",
setupFiles: ["<rootDir>/fixtures/gists-app/jest/setup.ts"],
setupFilesAfterEnv: [
"<rootDir>/fixtures/gists-app/jest/setupAfterEnv.ts",
],
},
],
watchPlugins: [
require.resolve("jest-watch-select-projects"),
require.resolve("jest-watch-typeahead/filename"),
require.resolve("jest-watch-typeahead/testname"),
],
};