From 11d2e463e37bdbf27ba3ffa4f01b7bbaca437c7e Mon Sep 17 00:00:00 2001 From: btopro Date: Wed, 2 Sep 2026 09:26:24 -0400 Subject: [PATCH] [create] Round out Seam C --help smoke coverage (#2959) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Verified item 1: running `npm test` against the registry-resolved @haxtheweb/haxcms-nodejs@26.8.1 (satisfies ^26.8.0) now passes 143/0/0 (pass/skip/fail), up from 137 pass with the previously gated tests skipped. No test-code changes were needed for this part — canary gating auto-activated as expected. Item 2: added --help smoke tests for the remaining subcommands (party, audit, skills, update, serve, start) to round out the subcommand help set, per the issue's suggested additions. The `hax site create` and `hax webcomponent` non-interactive smoke tests already existed in this file. Co-Authored-By: Warp --- test/smoke/cli.smoke.test.cjs | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/test/smoke/cli.smoke.test.cjs b/test/smoke/cli.smoke.test.cjs index 5d4c808..f0cdd31 100644 --- a/test/smoke/cli.smoke.test.cjs +++ b/test/smoke/cli.smoke.test.cjs @@ -84,6 +84,66 @@ test('CLI webcomponent --help prints the wc subcommand usage and exits 0', smoke assert.match(res.stdout, /Usage:/i) }) +test('CLI party --help prints the party subcommand usage and exits 0', smokeOpts, () => { + const res = spawnSync(process.execPath, [CLI, 'party', '--help'], { + encoding: 'utf8', + env: ISOLATED_ENV, + timeout: 15000, + }) + assert.equal(res.status, 0, `stderr: ${res.stderr}`) + assert.match(res.stdout, /Usage:/i) +}) + +test('CLI audit --help prints the audit subcommand usage and exits 0', smokeOpts, () => { + const res = spawnSync(process.execPath, [CLI, 'audit', '--help'], { + encoding: 'utf8', + env: ISOLATED_ENV, + timeout: 15000, + }) + assert.equal(res.status, 0, `stderr: ${res.stderr}`) + assert.match(res.stdout, /Usage:/i) +}) + +test('CLI skills --help prints the skills subcommand usage and exits 0', smokeOpts, () => { + const res = spawnSync(process.execPath, [CLI, 'skills', '--help'], { + encoding: 'utf8', + env: ISOLATED_ENV, + timeout: 15000, + }) + assert.equal(res.status, 0, `stderr: ${res.stderr}`) + assert.match(res.stdout, /Usage:/i) +}) + +test('CLI update --help prints the update subcommand usage and exits 0', smokeOpts, () => { + const res = spawnSync(process.execPath, [CLI, 'update', '--help'], { + encoding: 'utf8', + env: ISOLATED_ENV, + timeout: 15000, + }) + assert.equal(res.status, 0, `stderr: ${res.stderr}`) + assert.match(res.stdout, /Usage:/i) +}) + +test('CLI serve --help prints the serve subcommand usage and exits 0', smokeOpts, () => { + const res = spawnSync(process.execPath, [CLI, 'serve', '--help'], { + encoding: 'utf8', + env: ISOLATED_ENV, + timeout: 15000, + }) + assert.equal(res.status, 0, `stderr: ${res.stderr}`) + assert.match(res.stdout, /Usage:/i) +}) + +test('CLI start --help prints the start subcommand usage and exits 0', smokeOpts, () => { + const res = spawnSync(process.execPath, [CLI, 'start', '--help'], { + encoding: 'utf8', + env: ISOLATED_ENV, + timeout: 15000, + }) + assert.equal(res.status, 0, `stderr: ${res.stderr}`) + assert.match(res.stdout, /Usage:/i) +}) + test('CLI audit exits 0 on a clean fixture directory (compliant)', smokeOpts, () => { // audit uses process.cwd() as the project root; run it with cwd = an empty // temp dir so there are no CSS files to flag and it exits 0 (compliant).