You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/jest-worker/README.md
-6Lines changed: 0 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,8 +43,6 @@ export function hello(param) {
43
43
44
44
Node 10 shipped with [worker-threads](https://nodejs.org/api/worker_threads.html), a "threading API" that uses SharedArrayBuffers to communicate between the main process and its child threads. This experimental Node feature can significantly improve the communication time between parent and child processes in `jest-worker`.
45
45
46
-
Since `worker_threads` are considered experimental in Node, you have to opt-in to this behavior by passing `enableWorkerThreads: true` when instantiating the worker. While the feature was unflagged in Node 11.7.0, you'll need to run the Node process with the `--experimental-worker` flag for Node 10.
47
-
48
46
## API
49
47
50
48
The only exposed method is a constructor (`Worker`) that is initialized by passing the worker path, plus an options object.
@@ -89,10 +87,6 @@ Provide a custom worker pool to be used for spawning child processes. By default
89
87
90
88
The arguments that will be passed to the `setup` method during initialization.
91
89
92
-
#### `enableWorkerThreads: boolean` (optional)
93
-
94
-
`jest-worker` will automatically detect if `worker_threads` are available, but will not use them unless passed `enableWorkerThreads: true`.
95
-
96
90
## Worker
97
91
98
92
The returned `Worker` instance has all the exposed methods, plus some additional ones to interact with the workers itself:
0 commit comments