test: exempt process-exit spill cleanup from the per-file coverage gate
The exit listener runs after the coverage dump, so its body can never be measured by the unit coverage lane; mark it v8-ignore with the reason, as with other process-exit-only code paths.
This commit is contained in:
1 parent
1107ff5fe1
commit
6d9776a3b0
2 files changed
+2
No files matched your search
@@ -41,6 +41,7 @@ export function privateRoot(): string {
|
||||
// The spill root is private to this process, so it is removed when the process
|
||||
// ends normally; a process killed with SIGKILL cannot run this, and its
|
||||
// residue is left to OS temp hygiene.
|
||||
/* v8 ignore next 3 -- exit listeners run after the coverage dump; removal is verified by the CI /tmp residue measurement. */
|
||||
process.once('exit', () => {
|
||||
if (defaultRoot !== undefined) rmSync(defaultRoot, { recursive: true, force: true })
|
||||
})
|
||||
|
||||
@@ -94,6 +94,7 @@ function privateSpillDir(): string {
|
||||
// The spill directory is private to this process, so it is removed when the
|
||||
// process ends normally; a process killed with SIGKILL cannot run this, and
|
||||
// its residue is left to OS temp hygiene.
|
||||
/* v8 ignore next 3 -- exit listeners run after the coverage dump; removal is verified by the CI /tmp residue measurement. */
|
||||
process.once('exit', () => {
|
||||
if (defaultSpillDir !== undefined) rmSync(defaultSpillDir, { recursive: true, force: true })
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user