test: add 3 tests for setup-pm --project success, demo export, --list marker (Round 68)

This commit is contained in:
Affaan Mustafa
2026-02-13 07:23:16 -08:00
parent 702c3f54b4
commit 5031a84d6e
2 changed files with 49 additions and 0 deletions

View File

@@ -470,6 +470,17 @@ function runTests() {
assert.ok(boxLines.length >= 3, 'Should render a complete box');
})) passed++; else failed++;
// ── Round 68: demo function export ──
console.log('\ndemo export (Round 68):');
if (test('module exports demo function alongside SkillCreateOutput', () => {
const mod = require('../../scripts/skill-create-output');
assert.ok(mod.demo, 'Should export demo function');
assert.strictEqual(typeof mod.demo, 'function', 'demo should be a function');
assert.ok(mod.SkillCreateOutput, 'Should also export SkillCreateOutput');
assert.strictEqual(typeof mod.SkillCreateOutput, 'function', 'SkillCreateOutput should be a constructor');
})) passed++; else failed++;
// Summary
console.log(`\nResults: Passed: ${passed}, Failed: ${failed}`);
process.exit(failed > 0 ? 1 : 0);