test: tighten plugin cli node runtime assertion · openclaw/openclaw@b2507b9
steipete
·
2026-05-09
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -188,16 +188,11 @@ describe("registerPluginCliCommands", () => {
|
188 | 188 | it("injects gateway-backed node runtime into plugin CLI commands", async () => { |
189 | 189 | await registerPluginCliCommands(createProgram(), {} as OpenClawConfig); |
190 | 190 | |
191 | | -expect(mocks.loadOpenClawPlugins).toHaveBeenCalledWith( |
192 | | -expect.objectContaining({ |
193 | | -runtimeOptions: { |
194 | | -nodes: { |
195 | | -list: expect.any(Function), |
196 | | -invoke: expect.any(Function), |
197 | | -}, |
198 | | -}, |
199 | | -}), |
200 | | -); |
| 191 | +const loadOptions = mocks.loadOpenClawPlugins.mock.calls[0]?.[0] as |
| 192 | +| { runtimeOptions?: { nodes?: { list?: unknown; invoke?: unknown } } } |
| 193 | +| undefined; |
| 194 | +expect(typeof loadOptions?.runtimeOptions?.nodes?.list).toBe("function"); |
| 195 | +expect(typeof loadOptions?.runtimeOptions?.nodes?.invoke).toBe("function"); |
201 | 196 | }); |
202 | 197 | |
203 | 198 | it("reuses loaded plugin CLI entries on repeat calls for the same program", async () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。