Files
jhonny-editor/bm/premiere-pro-mcp-main/tests/tools/inspect-stabilizer-status.test.ts
T
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

32 lines
1.3 KiB
TypeScript
Executable File

import { beforeEach, describe, expect, it, vi } from "vitest";
vi.mock("../../src/bridge/file-bridge.js", () => ({ sendCommand: vi.fn().mockResolvedValue({ success: true }) }));
import { sendCommand } from "../../src/bridge/file-bridge.js";
import { getEffectsTools } from "../../src/tools/effects.js";
const mockedSendCommand = vi.mocked(sendCommand);
const tool = getEffectsTools({ tempDir: "/tmp/test" }).inspect_stabilizer_status;
beforeEach(() => vi.clearAllMocks());
describe("inspect_stabilizer_status", () => {
it("builds a read-only all-clips inspection with an explicit unknown-state boundary", async () => {
await tool.handler({});
const script = mockedSendCommand.mock.calls[0][0];
expect(script).toContain('requestedNodeId = ""');
expect(script).toContain("analysisStatus = \"unknown\"");
expect(script).toContain("unknown is not proof of a completed solve");
expect(script).not.toContain("setValue(");
expect(script).not.toContain("addVideoEffect(");
});
it("escapes and limits inspection to a requested video clip", async () => {
await tool.handler({ node_id: 'clip"1' });
const script = mockedSendCommand.mock.calls[0][0];
expect(script).toContain('requestedNodeId = "clip\\\"1"');
expect(script).toContain("__findClip(requestedNodeId)");
expect(script).toContain('found.trackType !== "video"');
});
});