Files
2026-07-13 12:22:59 +08:00

17 lines
556 B
TypeScript

import { describe, expect, it } from "bun:test";
import Plugin from "@oh-my-pi/pi-coding-agent/commands/plugin";
import type { CliConfig } from "@oh-my-pi/pi-utils/cli";
const TEST_CONFIG: CliConfig = {
bin: "omp",
version: "0.0.0-test",
commands: new Map(),
};
describe("Plugin command scope parsing", () => {
it("rejects invalid scope values", async () => {
const command = new Plugin(["install", "--scope", "porject"], TEST_CONFIG);
await expect(command.parse(Plugin)).rejects.toThrow(/Expected --scope to be one of: user, project/);
});
});