Skip to content

Commit 3d4c23c

Browse files
committed
Revert "try removing experimental swc config"
This reverts commit 57aef02.
1 parent 57aef02 commit 3d4c23c

File tree

1 file changed

+66
-63
lines changed

1 file changed

+66
-63
lines changed

site/jest.config.ts

Lines changed: 66 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,68 @@
11
module.exports = {
2-
// Use a big timeout for CI.
3-
testTimeout: 20_000,
4-
maxWorkers: 8,
5-
projects: [
6-
{
7-
displayName: "test",
8-
roots: ["<rootDir>"],
9-
setupFiles: ["./jest.polyfills.js"],
10-
setupFilesAfterEnv: ["./jest.setup.ts"],
11-
extensionsToTreatAsEsm: [".ts"],
12-
transform: {
13-
"^.+\\.(t|j)sx?$": [
14-
"@swc/jest",
15-
{
16-
jsc: {
17-
transform: {
18-
react: {
19-
runtime: "automatic",
20-
importSource: "@emotion/react",
21-
},
22-
},
23-
},
24-
},
25-
],
26-
},
27-
testEnvironment: "jsdom",
28-
testEnvironmentOptions: {
29-
customExportConditions: [""],
30-
},
31-
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
32-
testPathIgnorePatterns: [
33-
"/node_modules/",
34-
"/e2e/",
35-
// TODO: This test is timing out after upgrade a few Jest dependencies
36-
// and I was not able to figure out why. When running it specifically, I
37-
// can see many act warnings that may can help us to find the issue.
38-
"/usePaginatedQuery.test.ts",
39-
],
40-
transformIgnorePatterns: [
41-
"<rootDir>/node_modules/@chartjs-adapter-date-fns",
42-
],
43-
moduleDirectories: ["node_modules", "<rootDir>/src"],
44-
moduleNameMapper: {
45-
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts",
46-
"^@fontsource": "<rootDir>/src/testHelpers/styleMock.ts",
47-
},
48-
},
49-
],
50-
collectCoverageFrom: [
51-
// included files
52-
"<rootDir>/**/*.ts",
53-
"<rootDir>/**/*.tsx",
54-
// excluded files
55-
"!<rootDir>/**/*.stories.tsx",
56-
"!<rootDir>/_jest/**/*.*",
57-
"!<rootDir>/api.ts",
58-
"!<rootDir>/coverage/**/*.*",
59-
"!<rootDir>/e2e/**/*.*",
60-
"!<rootDir>/jest-runner.eslint.config.js",
61-
"!<rootDir>/jest.config.js",
62-
"!<rootDir>/out/**/*.*",
63-
"!<rootDir>/storybook-static/**/*.*",
64-
],
2+
// Use a big timeout for CI.
3+
testTimeout: 20_000,
4+
maxWorkers: 8,
5+
projects: [
6+
{
7+
displayName: "test",
8+
roots: ["<rootDir>"],
9+
setupFiles: ["./jest.polyfills.js"],
10+
setupFilesAfterEnv: ["./jest.setup.ts"],
11+
extensionsToTreatAsEsm: [".ts"],
12+
transform: {
13+
"^.+\\.(t|j)sx?$": [
14+
"@swc/jest",
15+
{
16+
jsc: {
17+
transform: {
18+
react: {
19+
runtime: "automatic",
20+
importSource: "@emotion/react",
21+
},
22+
},
23+
experimental: {
24+
plugins: [["jest_workaround", {}]],
25+
},
26+
},
27+
},
28+
],
29+
},
30+
testEnvironment: "jsdom",
31+
testEnvironmentOptions: {
32+
customExportConditions: [""],
33+
},
34+
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
35+
testPathIgnorePatterns: [
36+
"/node_modules/",
37+
"/e2e/",
38+
// TODO: This test is timing out after upgrade a few Jest dependencies
39+
// and I was not able to figure out why. When running it specifically, I
40+
// can see many act warnings that may can help us to find the issue.
41+
"/usePaginatedQuery.test.ts",
42+
],
43+
transformIgnorePatterns: [
44+
"<rootDir>/node_modules/@chartjs-adapter-date-fns",
45+
],
46+
moduleDirectories: ["node_modules", "<rootDir>/src"],
47+
moduleNameMapper: {
48+
"\\.css$": "<rootDir>/src/testHelpers/styleMock.ts",
49+
"^@fontsource": "<rootDir>/src/testHelpers/styleMock.ts",
50+
},
51+
},
52+
],
53+
collectCoverageFrom: [
54+
// included files
55+
"<rootDir>/**/*.ts",
56+
"<rootDir>/**/*.tsx",
57+
// excluded files
58+
"!<rootDir>/**/*.stories.tsx",
59+
"!<rootDir>/_jest/**/*.*",
60+
"!<rootDir>/api.ts",
61+
"!<rootDir>/coverage/**/*.*",
62+
"!<rootDir>/e2e/**/*.*",
63+
"!<rootDir>/jest-runner.eslint.config.js",
64+
"!<rootDir>/jest.config.js",
65+
"!<rootDir>/out/**/*.*",
66+
"!<rootDir>/storybook-static/**/*.*",
67+
],
6568
};

0 commit comments

Comments
 (0)