test.scripts/configuration/strings/closure.strings.test.ts

test.scripts/configuration/strings/closure.strings.test.ts is a file in Codebase Testing. 17 lines of code and 0 definitions.

import { describe, expect, it } from "vitest";
import {
    graphLine,
    unmatchedBarrels,
    unmatchedPattern,
} from "@project/scripts/configuration/strings/closure.strings.ts";

describe("the closure graph's lines", () => {
    it("names each barrel whose pattern matches nothing, under a heading that counts them", () => {
        const line = unmatchedPattern("core/index.ts", "./*.missing.ts");
        const report = unmatchedBarrels([line]);
        expect(report).toContain("1 import.meta.glob pattern(s) match no files");
        expect(report).toContain(`  ${line}`);
    });

    it("lists every count with its label", () => {
        expect(graphLine({ exports: 3, registers: 1 })).toBe("closure-graph: 3 exports, 1 registers\n");
    });
});