Skip to content

Commit 2bdb774

Browse files
committed
test: tighten tokenjuice middleware assertion
1 parent 9757a62 commit 2bdb774

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

extensions/tokenjuice/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ describe("tokenjuice bundled plugin", () => {
4848

4949
expect(createTokenjuiceOpenClawEmbeddedExtension).toHaveBeenCalledTimes(1);
5050
expect(tokenjuiceFactory).toHaveBeenCalledTimes(1);
51-
expect(registerAgentToolResultMiddleware).toHaveBeenCalledWith(expect.any(Function), {
52-
runtimes: ["pi", "codex"],
53-
});
51+
const registration = registerAgentToolResultMiddleware.mock.calls[0];
52+
expect(typeof registration?.[0]).toBe("function");
53+
expect(registration?.[1]).toEqual({ runtimes: ["pi", "codex"] });
5454
});
5555
});

0 commit comments

Comments
 (0)