test: tighten approval route timer assertion

This commit is contained in:
Peter Steinberger
2026-05-09 05:32:32 +01:00
parent 9e4fb927bc
commit fc11a54598

View File

@@ -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();
}