Skip to content

Commit 4b7f538

Browse files
committed
fix(wdio-local-runner): use gracefulExit to avoid synchronous termination notice
1 parent bc254a8 commit 4b7f538

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/wdio-local-runner/src/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ process.on('message', (m: Workers.WorkerCommand) => {
5151
}),
5252
(e: Error) => {
5353
log.error(`Failed launching test session: ${e.stack}`)
54-
setTimeout(() => process.exit(1), 10)
54+
setTimeout(() => gracefulExit(1), 10)
5555
}
5656
)
5757
})

packages/wdio-local-runner/tests/run.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ test('should exit process if failing to execute', async () => {
8383
})
8484
expect((await instances[0]).errorMe).toHaveBeenCalledTimes(1)
8585
await sleep()
86-
expect(process.exit).toBeCalledWith(1)
86+
expect(gracefulExitMock).toBeCalledWith(1)
8787

8888
})
8989

0 commit comments

Comments
 (0)