test(cli): cover shutdown timer invariants
This commit is contained in:
@@ -30,6 +30,7 @@ export function createProcessShutdown(
|
||||
const exitOnce = (code: number): void => {
|
||||
if (exited) return
|
||||
exited = true
|
||||
/* v8 ignore else -- shutdown() arms the timer before any asynchronous exit path can run. */
|
||||
if (timeout !== undefined) clearTimeout(timeout)
|
||||
exit(code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user