test: dedupe plugin cli mock reads · openclaw/openclaw@6715ac5
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -38,7 +38,7 @@ describe("plugins cli list", () => {
|
38 | 38 | await runPluginsCommand(["plugins", "list", "--json"]); |
39 | 39 | |
40 | 40 | expect(buildPluginRegistrySnapshotReport).toHaveBeenCalledTimes(1); |
41 | | -const [reportOptions] = buildPluginRegistrySnapshotReport.mock.calls.at(0) as [ |
| 41 | +const [reportOptions] = buildPluginRegistrySnapshotReport.mock.calls[0] as [ |
42 | 42 | { |
43 | 43 | config?: unknown; |
44 | 44 | logger?: { info?: unknown; warn?: unknown; error?: unknown }; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -47,7 +47,7 @@ function expectRestartNoticeLogged() {
|
47 | 47 | |
48 | 48 | function expectSingleCallParams(mockFn: ReturnType<typeof vi.fn>) { |
49 | 49 | expect(mockFn).toHaveBeenCalledTimes(1); |
50 | | -const params = mockFn.mock.calls.at(0)?.[0] as Record<string, unknown> | undefined; |
| 50 | +const params = mockFn.mock.calls[0]?.[0] as Record<string, unknown> | undefined; |
51 | 51 | if (params === undefined) { |
52 | 52 | throw new Error("expected call params"); |
53 | 53 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。