32 lines
1.3 KiB
JavaScript
32 lines
1.3 KiB
JavaScript
// tests/commands/trekplan.test.mjs
|
|
// v5.1 — sequencing-gate surface + low-effort prose check for /trekplan.
|
|
|
|
import { test } from 'node:test';
|
|
import { strict as assert } from 'node:assert';
|
|
import { readFileSync } from 'node:fs';
|
|
import { dirname, join } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
const ROOT = join(HERE, '..', '..');
|
|
const COMMAND_FILE = join(ROOT, 'commands', 'trekplan.md');
|
|
|
|
function read() {
|
|
return readFileSync(COMMAND_FILE, 'utf8');
|
|
}
|
|
|
|
test('trekplan — sequencing-gate surface mentions BRIEF_V51_MISSING_SIGNALS + phase_signals', () => {
|
|
const text = read();
|
|
assert.ok(text.includes('BRIEF_V51_MISSING_SIGNALS'),
|
|
'/trekplan must surface the BRIEF_V51_MISSING_SIGNALS sequencing gate');
|
|
assert.ok(text.includes('phase_signals'),
|
|
'/trekplan must reference phase_signals (v5.1 composition rule)');
|
|
});
|
|
|
|
test('trekplan — low-effort path references --quick equivalent', () => {
|
|
const text = read();
|
|
const compIdx = text.indexOf('## Composition rule (v5.1)');
|
|
assert.ok(compIdx >= 0, 'Composition rule (v5.1) section missing');
|
|
const section = text.slice(compIdx, compIdx + 2000);
|
|
assert.match(section, /--quick/, 'Low-effort path must mention --quick equivalent');
|
|
});
|