Created
June 8, 2020 17:41
-
-
Save sibelius/c6ef3f0890814dd4163a9ada0cd739f1 to your computer and use it in GitHub Desktop.
jest-worker patch to enable worker threads when running jest tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/jest-worker/build/index.js b/node_modules/jest-worker/build/index.js | |
index 820f6c9..d0a7b3f 100644 | |
--- a/node_modules/jest-worker/build/index.js | |
+++ b/node_modules/jest-worker/build/index.js | |
@@ -94,7 +94,7 @@ class JestWorker { | |
this._options = {...options}; | |
this._ending = false; | |
const workerPoolOptions = { | |
- enableWorkerThreads: this._options.enableWorkerThreads || false, | |
+ enableWorkerThreads: true, //this._options.enableWorkerThreads || false, | |
forkOptions: this._options.forkOptions || {}, | |
maxRetries: this._options.maxRetries || 3, | |
numWorkers: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment