Files
oh-my-pi/packages/coding-agent/test/plugin-command.test.ts
T
2026-05-12 04:09:33 +02:00

17 lines
537 B
TypeScript

import { describe, expect, it } from "bun:test";
import type { CliConfig } from "@oh-my-pi/pi-utils/cli";
import Plugin from "../src/commands/plugin";
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/);
});
});