Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions test/command-reference.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ it("committed command references equal what describe generates", () => {
const described = spawnCli(["describe"]);
assert.equal(described.status, 0, described.stderr);
const docs = renderCommandDocs(described.json);
assert.equal(readFileSync(new URL("../docs/command-reference.json", import.meta.url), "utf8"), docs.json);
assert.equal(readFileSync(new URL("../docs/command-reference.md", import.meta.url), "utf8"), docs.markdown);
// A Windows checkout may turn LF into CRLF (core.autocrlf); the generator writes LF.
const committed = (name) =>
readFileSync(new URL(`../docs/${name}`, import.meta.url), "utf8").replaceAll("\r\n", "\n");
assert.equal(committed("command-reference.json"), docs.json);
assert.equal(committed("command-reference.md"), docs.markdown);
});
Loading