test: dedupe cli registration mock reads · openclaw/openclaw@0d3b6d8
steipete
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -43,7 +43,7 @@ describe("registerBackupCommand", () => {
|
43 | 43 | |
44 | 44 | function expectForwardedOptions(command: typeof backupCreateCommand): Record<string, unknown> { |
45 | 45 | expect(command).toHaveBeenCalledTimes(1); |
46 | | -const call = command.mock.calls.at(0); |
| 46 | +const call = command.mock.calls[0]; |
47 | 47 | if (!call) { |
48 | 48 | throw new Error("expected backup command call"); |
49 | 49 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -59,7 +59,7 @@ function requireRecord(value: unknown, label: string): Record<string, unknown> {
|
59 | 59 | |
60 | 60 | function expectCommandOptions(command: MockCalls, expected: Record<string, unknown>) { |
61 | 61 | expect(command.mock.calls).toHaveLength(1); |
62 | | -const call = command.mock.calls.at(0); |
| 62 | +const call = command.mock.calls[0]; |
63 | 63 | if (!call) { |
64 | 64 | throw new Error("expected command call"); |
65 | 65 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。