Skip to content

Commit 682d832

Browse files
committed
Fix CI
1 parent 1760ae8 commit 682d832

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

components/dash-core-components/jest.config.js

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,25 @@ module.exports = {
44
roots: ['<rootDir>/tests'],
55
testMatch: ['**/__tests__/**/*.{ts,tsx}', '**/?(*.)+(spec|test).{ts,tsx}'],
66
transform: {
7-
'^.+\\.(ts|tsx)$': ['ts-jest', {
8-
tsconfig: {
9-
jsx: 'react',
10-
esModuleInterop: true,
11-
allowSyntheticDefaultImports: true,
12-
types: ['jest', '@testing-library/jest-dom'],
7+
'^.+\\.(ts|tsx)$': [
8+
'ts-jest',
9+
{
10+
tsconfig: {
11+
jsx: 'react',
12+
esModuleInterop: true,
13+
allowSyntheticDefaultImports: true,
14+
types: ['jest', '@testing-library/jest-dom'],
15+
},
1316
},
14-
}],
15-
'^.+\\.js$': ['ts-jest', {
16-
tsconfig: {
17-
allowJs: true,
17+
],
18+
'^.+\\.js$': [
19+
'ts-jest',
20+
{
21+
tsconfig: {
22+
allowJs: true,
23+
},
1824
},
19-
}],
25+
],
2026
},
2127
collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/**/*.d.ts'],
2228
moduleNameMapper: {
@@ -26,4 +32,6 @@ module.exports = {
2632
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
2733
// Disable caching to ensure TypeScript type changes are always picked up
2834
cache: false,
35+
// Limit workers in CI to prevent out-of-memory errors
36+
maxWorkers: process.env.CI ? 2 : undefined,
2937
};

0 commit comments

Comments
 (0)