#!/usr/bin/env node // [unit->REQ-DEP-04] // tools/scripts/lint-deploy-stack.test.mjs // Vitest-free smoke test. Asserts: // 1. Running lint against the live repo files exits 0 (golden case after Plans 01-03 land). // 2. (no fixture mode here — drift cases are exercised in CI via temporary git-mutation; // this test is a fast 'green' regression guard.) // Usage: node tools/scripts/lint-deploy-stack.test.mjs // Exit: 0 PASS, 1 FAIL. import { spawnSync } from 'node:child_process'; const isWindows = process.platform === 'win32'; const result = spawnSync('node', ['tools/scripts/lint-deploy-stack.mjs'], { stdio: 'pipe', shell: isWindows, encoding: 'utf-8', }); if (result.status !== 0) { console.error('FAIL: lint-deploy-stack exited', result.status); console.error(result.stdout); console.error(result.stderr); process.exit(1); } if (!result.stdout.includes('lint-deploy-stack: OK')) { console.error('FAIL: missing OK marker'); console.error(result.stdout); process.exit(1); } console.log('PASS: lint-deploy-stack green');