mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 00:00:42 +00:00
test: tighten approval route timer assertion
This commit is contained in:
@@ -44,7 +44,10 @@ describe("createApprovalNativeRouteReporter", () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect(setTimeoutSpy).toHaveBeenCalledWith(expect.any(Function), 5 * 60_000);
|
||||
expect(setTimeoutSpy).toHaveBeenCalledTimes(1);
|
||||
const [cleanupCallback, cleanupDelayMs] = setTimeoutSpy.mock.calls[0];
|
||||
expect(cleanupDelayMs).toBe(5 * 60_000);
|
||||
expect(cleanupCallback).toBeTypeOf("function");
|
||||
} finally {
|
||||
vi.useRealTimers();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user