mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-28 05:16:23 -06:00
test(cli): verify marketplace shorthand through command (#123883)
This commit is contained in:
committed by
GitHub
parent
2ce443d9a4
commit
bc66c1731f
@@ -18,7 +18,6 @@ import {
|
||||
runtimeErrors,
|
||||
configWriteMock,
|
||||
} from "./plugins-cli-test-helpers.js";
|
||||
import { resolvePluginInstallPreflight } from "./plugins-install-preflight.js";
|
||||
|
||||
const { withPluginLifecycleLeaseMock } = vi.hoisted(() => ({
|
||||
withPluginLifecycleLeaseMock: vi.fn(),
|
||||
@@ -62,19 +61,16 @@ describe("plugin install mutation-free preflight", () => {
|
||||
});
|
||||
|
||||
await expect(
|
||||
resolvePluginInstallPreflight({
|
||||
raw: "superpowers@claude-plugins-official",
|
||||
allowInstallPolicyWarningPrompt: false,
|
||||
opts: { force: true },
|
||||
}),
|
||||
).resolves.toMatchObject({
|
||||
ok: true,
|
||||
raw: "superpowers",
|
||||
marketplace: "claude-plugins-official",
|
||||
sourcePlan: null,
|
||||
});
|
||||
runPluginsCommand(["plugins", "install", "superpowers@claude-plugins-official", "--force"]),
|
||||
).rejects.toThrow("__exit__:1");
|
||||
|
||||
expectNoPluginInstallSideEffects();
|
||||
expect(installPluginFromMarketplaceMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
marketplace: "claude-plugins-official",
|
||||
plugin: "superpowers",
|
||||
}),
|
||||
);
|
||||
expect(installPluginFromNpmSpecMock).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it.each([
|
||||
|
||||
Reference in New Issue
Block a user