Skip to content

Commit 84489ed

Browse files
committed
test: prevent ts-jest worker OOM in CI unit tests
1 parent 36b65d4 commit 84489ed

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ steps:
7878
docker-compose#v4.12.0:
7979
run: ci
8080
command:
81-
- "npm run test:unit -- --maxWorkers=2"
81+
- "npm run test:unit"
8282

8383
- label: "Type checks/tests"
8484
depends_on: "ci-image"

jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const defaultModuleConfig = {
66
'^.+\\.m?[tj]sx?$': [
77
'ts-jest',
88
{
9+
isolatedModules: true,
910
tsconfig: {
1011
module: 'commonjs',
1112
target: 'ES2019',
@@ -34,6 +35,7 @@ const extensions = 'js,jsx,ts,tsx'
3435

3536
module.exports = {
3637
testTimeout: 10000,
38+
workerIdleMemoryLimit: '1GB',
3739
collectCoverageFrom: [
3840
`**/packages/*/src/**/*.{${extensions}}`,
3941
`!**/*.test.{${extensions}}`,
@@ -108,6 +110,7 @@ module.exports = {
108110
transform: {
109111
// Use ts-jest for TypeScript files
110112
'^.+\\.tsx?$': ['ts-jest', {
113+
isolatedModules: true,
111114
tsconfig: {
112115
module: 'commonjs',
113116
esModuleInterop: true,

0 commit comments

Comments
 (0)