Skip to content

feat: add quiet test output mode#61

Open
exo-mv wants to merge 6 commits into
mainfrom
feat/quiet-mode
Open

feat: add quiet test output mode#61
exo-mv wants to merge 6 commits into
mainfrom
feat/quiet-mode

Conversation

@exo-mv

@exo-mv exo-mv commented Jun 1, 2026

Copy link
Copy Markdown

Summary

  • add a --quiet flag that only reports failing test suites plus the final summary
  • buffer node:test reporter output so passing suites stay hidden while failures keep useful diagnostics
  • apply quiet filtering to pure/bundle subprocess output and handle watch-mode drain cycles

Verification

  • npm run lint
  • FORCE_COLOR=1 npm test
  • focused quiet-mode smoke checks for passing suites, failing node:test suites, pure/bundle output, and watch mode

Note: plain npm test is color-sensitive in this shell because vendor matcher assertions expect colored output; FORCE_COLOR=1 npm test passes.

exo-mv and others added 6 commits June 1, 2026 14:24
Adds a `--quiet` flag (and `EXODUS_TEST_QUIET=1` env equivalent) that
suppresses pass/skip lines and per-suite headers for passing suites,
surfacing only failing suites plus the final summary. Works across the
node:test reporter, CI `::group::` grouping, and the per-file bundle/
browser runner path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@exo-mv exo-mv marked this pull request as ready for review June 4, 2026 15:05

@sparten11740 sparten11740 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK - some non-blocking comments

Comment thread bin/index.js
setEnv('EXODUS_TEST_PLATFORM', options.binary === 'shermes' ? 'hermes' : options.binary) // e.g. 'hermes', 'node'
setEnv('EXODUS_TEST_TIMEOUT', options.testTimeout)
setEnv('EXODUS_TEST_DEVTOOLS', options.devtools ? '1' : '')
process.env.EXODUS_TEST_QUIET = options.quiet ? '1' : '' // internal signal for the reporter

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this also be using setEnv to warn of conflicts in case the env var is already set?

Comment thread bin/index.js
Comment on lines +813 to +819
const filterQuietOutput = (chunk) =>
options.quiet
? chunk
.split('\n')
.filter((line) => !/^(✔ PASS|⏭ SKIP) /u.test(line))
.join('\n')
: chunk

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not ideal in 3 (nit) aspects:

  • fn name sounds like a predicate, not something you'd pass into map
  • regex is constructed on each iteration
  • options.quiet and ternary could be hoisted so that it doesn't need to be checked on every iteration:
 const identity = (value) => value
 const filterQuietOutput = options.quiet 
    ? (chunk) => chunk.split('\n').filter((line) => !outcomeRegex.test(line)).join('\n')
    : identity

Comment thread bin/reporter.js
Comment on lines +181 to +184
if (!quiet) {
const label = data.skip ? color('⏭ SKIP ', dim) : color('✔ PASS ', 'green')
if (!pskip(path)) print(`${label}${pathstr(path)}${formatSuffix(data)}`)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if architecturally this could've been done in a more extensible way e.g. abstract this behind a reporter interface that receives the log output and internally decides whether to buffer, print right away, remove parts of the output, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants