Skip to content

Commit b5bbebc

Browse files
committed
Refactoring
1 parent f4ed998 commit b5bbebc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/helpers/exit.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import { startLogging } from './start.js'
1010
// `process.exit()` is being stubbed
1111
export const startProcessLogging = function (eventName, opts) {
1212
const processHandler = setProcessEvent(eventName)
13-
const stopLogging = startExitLogging(opts)
13+
stubProcessExit()
14+
const { stopLogging } = startLogging(opts)
1415
return stopProcessLogging.bind(
1516
undefined,
1617
eventName,
@@ -21,6 +22,7 @@ export const startProcessLogging = function (eventName, opts) {
2122

2223
const stopProcessLogging = function (eventName, stopLogging, processHandler) {
2324
stopLogging()
25+
unStubProcessExit()
2426
unsetProcessEvent(eventName, processHandler)
2527
}
2628

0 commit comments

Comments
 (0)