fix(app-boot): drop the unreachable timer guard on the fail-loud release path
The timeout promise's executor runs synchronously while the race is constructed, so the timer is always assigned; the undefined check was a dead branch the per-file coverage gate rejected.
This commit is contained in:
@@ -384,7 +384,9 @@ export function installFailLoud(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
void (async () => {
|
void (async () => {
|
||||||
let timer: ReturnType<typeof setTimeout> | undefined
|
// Definitely assigned: the timeout promise's executor runs synchronously
|
||||||
|
// while the race is being constructed, before the first await.
|
||||||
|
let timer!: ReturnType<typeof setTimeout>
|
||||||
try {
|
try {
|
||||||
await Promise.race([
|
await Promise.race([
|
||||||
(async () => release())(),
|
(async () => release())(),
|
||||||
@@ -396,7 +398,7 @@ export function installFailLoud(
|
|||||||
// The terminal release failed; the fatal exit below is the outcome that
|
// The terminal release failed; the fatal exit below is the outcome that
|
||||||
// matters, and no reporter runs after it.
|
// matters, and no reporter runs after it.
|
||||||
}
|
}
|
||||||
if (timer !== undefined) clearTimeout(timer)
|
clearTimeout(timer)
|
||||||
proc.exit(1)
|
proc.exit(1)
|
||||||
})()
|
})()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user