test: guard plugin uninstall mock call · openclaw/openclaw@9433f79
steipete
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -245,7 +245,7 @@ async function expectPathAccessState(pathToCheck: string, expected: "exists" | "
|
245 | 245 | } |
246 | 246 | |
247 | 247 | function expectNpmUninstallCommand(params: { packageName: string; npmRoot: string }) { |
248 | | -const command = runCommandWithTimeoutMock.mock.calls[0]; |
| 248 | +const command = runCommandWithTimeoutMock.mock.calls.at(0); |
249 | 249 | if (!command) { |
250 | 250 | throw new Error("Expected npm uninstall command"); |
251 | 251 | } |
@@ -259,7 +259,7 @@ function expectNpmUninstallCommand(params: { packageName: string; npmRoot: strin
|
259 | 259 | "--no-fund", |
260 | 260 | params.packageName, |
261 | 261 | ]); |
262 | | -const options = command?.[1] as { |
| 262 | +const options = command[1] as { |
263 | 263 | cwd?: string; |
264 | 264 | timeoutMs?: number; |
265 | 265 | env?: Record<string, string>; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。