test: tighten skill workshop hook assertions · openclaw/openclaw@0048f95
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
File tree
extensions/skill-workshop
| Original file line number | Diff line number | Diff line change |
|---|
@@ -67,8 +67,9 @@ describe("skill-workshop", () => {
|
67 | 67 | plugin.register(api); |
68 | 68 | |
69 | 69 | expect(tool).toBeNull(); |
70 | | -expect(on).toHaveBeenCalledWith("before_prompt_build", expect.any(Function)); |
71 | | -expect(on).toHaveBeenCalledWith("agent_end", expect.any(Function)); |
| 70 | +expect(on.mock.calls.map(([hook]) => hook)).toEqual(["before_prompt_build", "agent_end"]); |
| 71 | +expect(typeof on.mock.calls[0]?.[1]).toBe("function"); |
| 72 | +expect(typeof on.mock.calls[1]?.[1]).toBe("function"); |
72 | 73 | }); |
73 | 74 | |
74 | 75 | it("detects user corrections and creates an animated GIF proposal", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。