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"] }); }); });