← back to Stars of Design
sod smoke +--json flag (parity)
b90e2bba44b8f81fef65e10825c8653a1df358ba · 2026-05-13 08:38:54 -0700 · Steve Abrams
Files touched
Diff
commit b90e2bba44b8f81fef65e10825c8653a1df358ba
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Wed May 13 08:38:54 2026 -0700
sod smoke +--json flag (parity)
---
test/smoke.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/test/smoke.js b/test/smoke.js
index 88bba91..69e26ef 100644
--- a/test/smoke.js
+++ b/test/smoke.js
@@ -138,7 +138,13 @@ function check(name, cond, hint = '') {
r = await fetch('/submit');
check('submit: 200', r.status === 200);
- // Report — pass --quiet to only print failures (useful for CI / cron)
+ // Report — flags:
+ // --quiet : only print failures + tally (CI / cron)
+ // --json : emit a single JSON object (monitoring / dashboards)
+ if (process.argv.includes('--json')) {
+ console.log(JSON.stringify({ base: BASE, pass, fail, total: pass + fail, checks, as_of: new Date().toISOString() }));
+ process.exit(fail === 0 ? 0 : 1);
+ }
const quiet = process.argv.includes('--quiet');
const lines = quiet
? checks.filter(c => !c.ok).map(c => '✗ ' + c.name + (c.hint ? ' (' + c.hint + ')' : ''))
← a909b13 sod .deploy.conf — point HEALTH_URL at /healthz (cheap liven
·
back to Stars of Design
·
sod smoke --json suppresses header 660a173 →