mirror of
https://github.com/bpmforge/kryptkeeper.git
synced 2026-11-23 16:02:01 +00:00
e0d82a4ed0
First stable release. Notes: docs/release/RELEASE_NOTES_v1.0.0.md Lab record: docs/release/LIVE_RESULTS_v1.0.0.md
18 lines
646 B
JavaScript
18 lines
646 B
JavaScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { lintPlaybook, REQUIRED } from "./validate-playbooks.mjs";
|
|
|
|
const body = "a\nb\nc\n";
|
|
const good = REQUIRED.map((h) => `## ${h}\n${body}`).join("\n");
|
|
|
|
test("good playbook passes", () => {
|
|
assert.deepEqual(lintPlaybook(good), []);
|
|
});
|
|
|
|
test("missing heading and thin section fail", () => {
|
|
const bad = good.replace("## Rollback", "## Back out").replace(/## Prerequisites\na\nb\nc\n/, "## Prerequisites\na\n");
|
|
const errs = lintPlaybook(bad);
|
|
assert.ok(errs.some((e) => e.includes("Rollback")));
|
|
assert.ok(errs.some((e) => e.includes("Prerequisites")));
|
|
});
|