test(plugins): narrow npm install mock options · openclaw/openclaw@80c47ec
openclaw
·
2026-06-17
·
via Recent Commits to openclaw:main
Commit 80c47ec
test(plugins): narrow npm install mock options
1 file changed
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|
@@ -427,6 +427,9 @@ function mockSuccessfulManagedNpmInstall(params: { packageName: string; version?
|
427 | 427 | throw new Error(`unexpected command: ${args.join(" ")}`); |
428 | 428 | } |
429 | 429 | if (!args.includes("--package-lock-only")) { |
| 430 | +if (typeof options === "number") { |
| 431 | +throw new Error("expected npm install options object"); |
| 432 | +} |
430 | 433 | const npmRoot = options.cwd; |
431 | 434 | if (!npmRoot) { |
432 | 435 | throw new Error("expected npm install cwd"); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
0 commit comments