41 lines
975 B
TypeScript
41 lines
975 B
TypeScript
import { assertEquals, assertThrows } from "jsr:@std/assert@1";
|
|
import { parseBotType, superpowersInstallCommands } from "./superpowers.ts";
|
|
|
|
Deno.test("installs Superpowers from the Codex marketplace", () => {
|
|
assertEquals(superpowersInstallCommands("codex"), [{
|
|
command: "codex",
|
|
args: ["plugin", "add", "superpowers@openai-curated-remote"],
|
|
}]);
|
|
});
|
|
|
|
Deno.test("installs Superpowers from the Claude marketplace", () => {
|
|
assertEquals(superpowersInstallCommands("claude"), [
|
|
{
|
|
command: "claude",
|
|
args: [
|
|
"plugin",
|
|
"marketplace",
|
|
"add",
|
|
"obra/superpowers-marketplace",
|
|
],
|
|
},
|
|
{
|
|
command: "claude",
|
|
args: [
|
|
"plugin",
|
|
"install",
|
|
"-y",
|
|
"superpowers@superpowers-marketplace",
|
|
],
|
|
},
|
|
]);
|
|
});
|
|
|
|
Deno.test("rejects an unsupported bot type", () => {
|
|
assertThrows(
|
|
() => parseBotType("other"),
|
|
Error,
|
|
"unsupported bot type: other",
|
|
);
|
|
});
|