Skip to content

Instantly share code, notes, and snippets.

@sibelius
Created June 8, 2020 17:41
Show Gist options
  • Save sibelius/c6ef3f0890814dd4163a9ada0cd739f1 to your computer and use it in GitHub Desktop.
Save sibelius/c6ef3f0890814dd4163a9ada0cd739f1 to your computer and use it in GitHub Desktop.
jest-worker patch to enable worker threads when running jest tests
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