test: tighten tokenjuice middleware assertion · openclaw/openclaw@2bdb774
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -48,8 +48,8 @@ describe("tokenjuice bundled plugin", () => {
|
48 | 48 | |
49 | 49 | expect(createTokenjuiceOpenClawEmbeddedExtension).toHaveBeenCalledTimes(1); |
50 | 50 | 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"] }); |
54 | 54 | }); |
55 | 55 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。