From 45c56553afcaac34b509d41ea220f98c42834de8 Mon Sep 17 00:00:00 2001 From: Roger Chappel Date: Thu, 11 Jun 2026 18:34:16 +1000 Subject: [PATCH] test: fix release readiness validation after main merge --- README.md | 1 + test/cli.test.js | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 737b6b3..f6abd30 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,7 @@ npm run check npm run smoke npm run package:smoke npm run release:check +bash scripts/validate.sh ``` ## Limitations diff --git a/test/cli.test.js b/test/cli.test.js index 836fa4d..f933422 100644 --- a/test/cli.test.js +++ b/test/cli.test.js @@ -6,9 +6,8 @@ import { tmpdir } from 'node:os'; import { join } from 'node:path'; test('atomcommit plan test - CLI should handle --help', () => { - const { execSync } = require('child_process'); try { - const out = execSync('node src/index.js --help', { encoding: 'utf8', stdio: 'pipe' }); + const out = execFileSync('node', ['src/index.js', '--help'], { encoding: 'utf8', stdio: 'pipe' }); assert.ok(out.includes('atomcommit') || out.includes('plan') || out.includes('commit'), 'help should mention atomcommit or plan'); } catch (e) { @@ -17,13 +16,13 @@ test('atomcommit plan test - CLI should handle --help', () => { } }); -test('parseNameStatus handles invalid input', () => { +test('parseNameStatus handles invalid input', async () => { const { parseNameStatus } = await import('../src/index.js'); const result = parseNameStatus(''); assert.deepEqual(result, [], 'empty input returns empty array'); }); -test('parseNumstat handles binary markers', () => { +test('parseNumstat handles binary markers', async () => { const { parseNumstat } = await import('../src/index.js'); const result = parseNumstat('-\t-\tbinary.png\n'); assert.ok(result.get('binary.png').binary, 'should detect binary files');