@@ -6,8 +6,8 @@ import sinon from 'sinon'
66import { setProcessEvent , unsetProcessEvent } from './process.js'
77import { startLogging } from './start.js'
88
9- // Start logging while a specific process event handler is being used, and
10- // `process.exit()` is being stubbed
9+ // Start logging and stub `process.exit()`, while a specific process event
10+ // handler is being used
1111export const startProcessLogging = function ( eventName , opts ) {
1212 const processHandler = setProcessEvent ( eventName )
1313 const stopLogging = startExitLogging ( opts )
@@ -24,7 +24,7 @@ const stopProcessLogging = function (eventName, stopLogging, processHandler) {
2424 unsetProcessEvent ( eventName , processHandler )
2525}
2626
27- // Start logging while `setTimeout ()` and `process.exit ()` are being stubbed
27+ // Start logging and stub `process.exit ()` and `setTimeout ()`
2828export const startClockLogging = function ( opts ) {
2929 const clock = fakeTimers . install ( { toFake : [ 'setTimeout' ] } )
3030 const stopLogging = startExitLogging ( opts )
@@ -37,7 +37,7 @@ const stopClockLogging = function (stopLogging, clock) {
3737 clock . uninstall ( )
3838}
3939
40- // Start logging while `process.exit()` is being stubbed
40+ // Start logging and stub `process.exit()`
4141export const startExitLogging = function ( opts ) {
4242 sinon . stub ( process , 'exit' )
4343 const { stopLogging } = startLogging ( opts )
0 commit comments