From 2bdb774726246346a3775ede280cc639f46d40ed Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 9 May 2026 04:22:43 +0100 Subject: [PATCH] test: tighten tokenjuice middleware assertion --- extensions/tokenjuice/index.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/tokenjuice/index.test.ts b/extensions/tokenjuice/index.test.ts index ede7c7769c9..f26ccbd369d 100644 --- a/extensions/tokenjuice/index.test.ts +++ b/extensions/tokenjuice/index.test.ts @@ -48,8 +48,8 @@ describe("tokenjuice bundled plugin", () => { expect(createTokenjuiceOpenClawEmbeddedExtension).toHaveBeenCalledTimes(1); expect(tokenjuiceFactory).toHaveBeenCalledTimes(1); - expect(registerAgentToolResultMiddleware).toHaveBeenCalledWith(expect.any(Function), { - runtimes: ["pi", "codex"], - }); + const registration = registerAgentToolResultMiddleware.mock.calls[0]; + expect(typeof registration?.[0]).toBe("function"); + expect(registration?.[1]).toEqual({ runtimes: ["pi", "codex"] }); }); });