mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 15:54:58 +00:00
perf(test): reduce module reload overhead in key suites
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user