Cotton code
15 lines · 791 B · TypeScriptRaw
import { spawnSync } from "node:child_process";import { join } from "node:path";import { expect, it } from "vitest";// RULE: Every built-in tool uses record cards and every dealt card fits the theme and names a drawable object; check on every push so new definitions cannot silently lose fields or acts.it("every built-in definition can deal its record cards", () => {  const result = spawnSync("pnpm", ["-s", "gen:page-cards", "--check"], {    cwd: join(__dirname, "../.."), encoding: "utf8", timeout: 30_000,  });  const output = result.stdout + result.stderr;  expect(result.error, output).toBeUndefined();  expect(output).not.toContain("cards a definition cannot deal");  expect(output).not.toContain("not on cards yet");  expect(result.status, output).toBe(0);}, 35_000);