[object Object]

← back to AsSeenInMovies

asseeninmovies: smoke --quiet flag prints only failures + final tally. CI/cron friendly.

c2129840470f02a3c6b67b841a04d4f26a854456 · 2026-05-13 05:51:41 -0700 · SteveStudio2

Files touched

Diff

commit c2129840470f02a3c6b67b841a04d4f26a854456
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Wed May 13 05:51:41 2026 -0700

    asseeninmovies: smoke --quiet flag prints only failures + final tally. CI/cron friendly.
---
 test/smoke.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/test/smoke.js b/test/smoke.js
index 755b754..ac7d0d6 100644
--- a/test/smoke.js
+++ b/test/smoke.js
@@ -154,9 +154,13 @@ function check(name, cond, hint = '') {
   r = await fetch('/api/zzz-not-a-real');
   check('404 api: JSON 404',   r.status === 404 && /"error":"not-found"/.test(r.body));
 
-  // Report
-  console.log(checks.map(c => (c.ok ? '✓' : '✗') + ' ' + c.name + (c.hint ? '  (' + c.hint + ')' : '')).join('\n'));
-  console.log(`\n${pass} passed, ${fail} failed`);
+  // Report — pass --quiet to only print failures (useful for CI / cron)
+  const quiet = process.argv.includes('--quiet');
+  const lines = quiet
+    ? checks.filter(c => !c.ok).map(c => '✗ ' + c.name + (c.hint ? '  (' + c.hint + ')' : ''))
+    : checks.map(c => (c.ok ? '✓' : '✗') + ' ' + c.name + (c.hint ? '  (' + c.hint + ')' : ''));
+  if (lines.length) console.log(lines.join('\n'));
+  console.log(`${quiet && fail === 0 ? '' : '\n'}${pass} passed, ${fail} failed`);
   process.exit(fail === 0 ? 0 : 1);
 })().catch((e) => {
   console.error('smoke harness error:', e.message);

← d17d0a5 asseeninmovies: home stat-row — show credits count (363,323  ·  back to AsSeenInMovies  ·  asseeninmovies: smoke +gzip header check on /movies (verifie 15d32a7 →