From eec268ee42cddb0f8cebf5fd56a4f547ca7b9b27 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Sat, 21 Mar 2026 18:01:39 +0900 Subject: [PATCH] fix: use find() instead of calls[0] in wakeGateway test to handle background fetch calls --- src/openclaw/__tests__/dispatcher.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openclaw/__tests__/dispatcher.test.ts b/src/openclaw/__tests__/dispatcher.test.ts index 95fbd320b..43485ae1c 100644 --- a/src/openclaw/__tests__/dispatcher.test.ts +++ b/src/openclaw/__tests__/dispatcher.test.ts @@ -40,7 +40,7 @@ describe("OpenClaw Dispatcher", () => { expect(result.success).toBe(true) expect(fetchSpy).toHaveBeenCalled() - const call = fetchSpy.mock.calls[0] + const call = fetchSpy.mock.calls.find(c => c[0] === "https://example.com") expect(call[0]).toBe("https://example.com") expect(call[1]?.method).toBe("POST") expect(call[1]?.body).toBe('{"foo":"bar"}')