Files
João Henrique b541f502ba feat: initial commit - Jhonny Editor
- Adicionado estrutura completa do projeto
- Configurado MCP server para Premiere Pro
- Adicionado documentação e skills
- Configurado Gitignore para o projeto
2026-09-08 09:59:31 -04:00

39 lines
1.5 KiB
TypeScript
Executable File

import { describe, expect, it } from "vitest";
import {
buildToolPackReport,
isToolInSelectedPacks,
resolveToolPacks,
} from "../../src/workflows/tool-packs.js";
describe("workflow tool packs", () => {
it("keeps the backwards-compatible full catalog when unconfigured", () => {
expect(resolveToolPacks(undefined, "default")).toEqual({
source: "default",
selected: [],
fullCatalog: true,
});
});
it("unions explicit packs without granting tools outside them", () => {
const selection = resolveToolPacks("essential, delivery, essential", "explicit");
expect(selection).toMatchObject({
source: "explicit",
selected: ["essential", "delivery"],
fullCatalog: false,
});
expect(isToolInSelectedPacks("get_project_info", selection)).toBe(true);
expect(isToolInSelectedPacks("export_aaf", selection)).toBe(true);
expect(isToolInSelectedPacks("create_bin", selection)).toBe(false);
const report = buildToolPackReport(selection);
expect(report.selected).toEqual(["essential", "delivery"]);
expect(report.note).toContain("do not grant capabilities");
});
it("rejects ambiguous or unknown configuration", () => {
expect(() => resolveToolPacks("full,inspection", "explicit")).toThrow(/cannot combine/i);
expect(() => resolveToolPacks("unknown", "explicit")).toThrow(/Unknown Premiere MCP tool pack/i);
expect(() => resolveToolPacks(",", "explicit")).toThrow(/must select full or at least one pack/i);
});
});