17 lines
817 B
JavaScript
17 lines
817 B
JavaScript
import assert from "node:assert/strict";
|
|
import { execFileSync } from "node:child_process";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import test from "node:test";
|
|
|
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
const script = path.join(root, "scripts/template-conformance.cjs");
|
|
|
|
test("template:conformance automatically discovers all template packages", () => {
|
|
const output = execFileSync(process.execPath, [script], { cwd: root, encoding: "utf8" });
|
|
assert.match(output, /Conformance passed: acheng-campus-food@1\.0\.0/);
|
|
assert.match(output, /Conformance passed: atelier-solopreneur@1\.1\.0/);
|
|
assert.match(output, /Conformance passed: linjing-editorial@1\.0\.0/);
|
|
assert.match(output, /Template conformance passed: 3 package\(s\)\./);
|
|
});
|