Files
jhonny-editor/code/tests/project-intake-starter-templates.test.ts
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

38 lines
1.2 KiB
TypeScript
Executable File

import { readFileSync } from "node:fs";
import { join } from "node:path";
import { describe, expect, it } from "vitest";
import { validateFacilityIntakeTemplate } from "../src/intake/project-intake.js";
type StarterTemplateFile = {
templates: Array<{
key: string;
label: string;
description: string;
checks: string[];
template: unknown;
}>;
};
const starters = JSON.parse(
readFileSync(join(process.cwd(), "landing", "lib", "project-intake-starter-templates.json"), "utf8"),
) as StarterTemplateFile;
describe("Project Intake starter templates", () => {
it("keeps every public starter template valid for the real preview tool", () => {
expect(starters.templates.map((starter) => starter.key)).toEqual([
"editorial_handoff",
"proxy_ready",
"delivery_preflight",
]);
for (const starter of starters.templates) {
expect(starter.label).not.toHaveLength(0);
expect(starter.description).not.toHaveLength(0);
expect(starter.checks.length).toBeGreaterThan(0);
const template = validateFacilityIntakeTemplate(starter.template);
expect(template.approvedPathPrefixes).toEqual([]);
expect(JSON.stringify(template)).not.toMatch(/[A-Za-z]:[\\/]|\\\\/);
}
});
});