perf(test): reduce module reload overhead in key suites

This commit is contained in:
Peter Steinberger
2026-02-13 15:45:08 +00:00
parent 4337fa2096
commit 41f2f359a5
12 changed files with 114 additions and 116 deletions

View File

@@ -173,3 +173,17 @@ export function hasHeartbeatWakeHandler() {
export function hasPendingHeartbeatWake() {
return pendingWake !== null || Boolean(timer) || scheduled;
}
export function resetHeartbeatWakeStateForTests() {
if (timer) {
clearTimeout(timer);
}
timer = null;
timerDueAt = null;
timerKind = null;
pendingWake = null;
scheduled = false;
running = false;
handlerGeneration += 1;
handler = null;
}