test(cli): cover shutdown timer invariants

This commit is contained in:
fz
2026-08-04 11:03:52 +08:00
parent 003d297442
commit 8ea88a589b
3 files changed
+32 -1

No files matched your search

+1
View File
@@ -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)
}