Scaffold LogicSRC and CommandBoard plugins

This commit is contained in:
Anthony Ettinger 2026-06-06 11:24:02 +00:00
parent 59927e140c
commit 5c9ea821f6
67 changed files with 5958 additions and 0 deletions

View file

@ -0,0 +1,28 @@
import { readFileSync } from "node:fs";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { describe, expect, it } from "vitest";
import { parseDocument, validate } from "./index.js";
describe("LogicSRC validators", () => {
it("validates the task fixture", () => {
const testDir = dirname(fileURLToPath(import.meta.url));
const file = resolve(testDir, "../../schemas/fixtures/task.yaml");
const data = parseDocument(readFileSync(file, "utf8"), file);
expect(validate("task", data).ok).toBe(true);
});
it("rejects a task without a DID", () => {
const result = validate("task", {
type: "logicsrc.task",
version: "0.1",
title: "Missing DID",
description: "This should fail.",
board: "/qa",
status: "open"
});
expect(result.ok).toBe(false);
});
});