diff --git a/packages/jest-worker/package.json b/packages/jest-worker/package.json index f6789815c3d6..39370ad97b66 100644 --- a/packages/jest-worker/package.json +++ b/packages/jest-worker/package.json @@ -10,6 +10,7 @@ "main": "build/index.js", "types": "build/index.d.ts", "dependencies": { + "exit": "^0.1.2", "merge-stream": "^1.0.1", "supports-color": "^6.1.0" }, diff --git a/packages/jest-worker/src/workers/processChild.ts b/packages/jest-worker/src/workers/processChild.ts index beb395af1a22..5bdc3647b63d 100644 --- a/packages/jest-worker/src/workers/processChild.ts +++ b/packages/jest-worker/src/workers/processChild.ts @@ -5,6 +5,10 @@ * LICENSE file in the root directory of this source tree. */ +'use strict'; + +import exit from 'exit'; + import { CHILD_MESSAGE_CALL, CHILD_MESSAGE_END, @@ -106,7 +110,7 @@ function end(): void { } function exitProcess(): void { - process.exit(0); + exit(0); } function execMethod(method: string, args: Array): void {