mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-22 17:38:09 +00:00
test(plugins): narrow npm install mock options
This commit is contained in:
@@ -427,6 +427,9 @@ function mockSuccessfulManagedNpmInstall(params: { packageName: string; version?
|
||||
throw new Error(`unexpected command: ${args.join(" ")}`);
|
||||
}
|
||||
if (!args.includes("--package-lock-only")) {
|
||||
if (typeof options === "number") {
|
||||
throw new Error("expected npm install options object");
|
||||
}
|
||||
const npmRoot = options.cwd;
|
||||
if (!npmRoot) {
|
||||
throw new Error("expected npm install cwd");
|
||||
|
||||
Reference in New Issue
Block a user