Skip to content

feat: add quiet test output mode#61

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

feat: add quiet test output mode#61
exo-mv wants to merge 7 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?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

it currently it silently ignores the EXODUS_TEST_QUIET env var. I don't think we need to support two modes (env var and cli flag) for every single thing, or even most things, but let's wait to hear from @ChALkeR

Comment thread bin/index.js Outdated
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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, but a much bigger refactor

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