From 8719aff00fe17c6ec8b43da2580271938ee5dd08 Mon Sep 17 00:00:00 2001 From: Andrew Leedham Date: Mon, 8 Aug 2022 13:57:37 +0100 Subject: [PATCH] fix: add workerIdleMemoryLimit to ValidConfig (#13105) --- packages/jest-config/src/ValidConfig.ts | 1 + packages/jest-types/src/Config.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/jest-config/src/ValidConfig.ts b/packages/jest-config/src/ValidConfig.ts index 18b083bbb8bf..02b19ee2b820 100644 --- a/packages/jest-config/src/ValidConfig.ts +++ b/packages/jest-config/src/ValidConfig.ts @@ -187,6 +187,7 @@ const initialOptions: Config.InitialOptions = { ], ], watchman: true, + workerIdleMemoryLimit: multipleValidOptions(0.2, '50%'), }; export default initialOptions; diff --git a/packages/jest-types/src/Config.ts b/packages/jest-types/src/Config.ts index 87a4eb29bdc2..fc3de9a49e64 100644 --- a/packages/jest-types/src/Config.ts +++ b/packages/jest-types/src/Config.ts @@ -327,7 +327,7 @@ export type InitialOptions = Partial<{ watchAll: boolean; watchman: boolean; watchPlugins: Array]>; - workerIdleMemoryLimit: number; + workerIdleMemoryLimit: number | string; }>; export type SnapshotUpdateState = 'all' | 'new' | 'none'; @@ -574,6 +574,6 @@ export type Argv = Arguments< watchAll: boolean; watchman: boolean; watchPathIgnorePatterns: Array; - workerIdleMemoryLimit: number; + workerIdleMemoryLimit: number | string; }> >;