Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

test: expect CLI usage exit for unsupported preview

tt-a1ica47015663e9
diff --git a/test/explainer-cli.test.mjs b/test/explainer-cli.test.mjs
index 6dd3ef3b..e4e087d8 100644
--- a/test/explainer-cli.test.mjs
+++ b/test/explainer-cli.test.mjs
@@ -90,11 +90,11 @@ test('default explainer finalize succeeds without discovering or launching a bro
const full=JSON.parse(fs.readFileSync(summary.evidence.receipt,'utf8'));assert.deepEqual(full.browserCheck,summary.browserCheck);assert.equal(full.stages['browser-check'].execution,'not-requested');
});
- test('explainer live preview explains the supported delivery path before reading input', t => {
+test('explainer live preview explains the supported delivery path before reading input', t => {
const dir = temporary(t), output = path.join(dir, 'result.html');
fs.writeFileSync(output, 'last good artifact');
const result = run(['preview', 'explainer', path.join(dir, 'missing.md'), output, '--no-open']);
- assert.equal(result.status, 1);
+ assert.equal(result.status, 2);
assert.match(result.stderr, /Live preview supports the ten diagram types only/);
assert.match(result.stderr, /finalize explainer/);
assert.equal(fs.readFileSync(output, 'utf8'), 'last good artifact');