Skip to content

Commit 65c4914

Browse files
author
jobordu
committed
fix(install-test): skip TUI data loading tests when requirements.json absent
These tests require local dev files (.planning/formal/requirements.json) that are not included in the npm package. Skip them when running as virgin install tests to prevent false failures.
1 parent c572b84 commit 65c4914

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

test/install-virgin.test.cjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,16 @@ describe('virgin install: npm global simulation', () => {
591591
// ── TUI data loading: real requirements.json ─────────────────────────────────
592592
// Validates that requirements-core.cjs can load real project data.
593593
// This catches regressions where the data file schema changes or paths break.
594+
//
595+
// NOTE: .planning/formal/requirements.json is a LOCAL DEV FILE not included in
596+
// the npm package. These tests require local project context and must be
597+
// skipped when running as part of virgin install tests (where only the
598+
// installed package exists, not the full dev tree).
594599

595-
describe('TUI data loading: requirements', () => {
600+
const REQ_JSON_PATH = path.join(__dirname, '..', '.planning', 'formal', 'requirements.json');
601+
const hasLocalRequirements = fs.existsSync(REQ_JSON_PATH);
602+
603+
describe('TUI data loading: requirements', { skip: !hasLocalRequirements }, () => {
596604
test('readRequirementsJson returns non-empty requirements array', () => {
597605
const reqCore = require('../bin/requirements-core.cjs');
598606
const { envelope, requirements } = reqCore.readRequirementsJson();

0 commit comments

Comments
 (0)