Repository navigation
fix(vitest): preserve explicit reporters - #2294
Conversation
|
Hey @jsiu93, thanks for addressing this issue. Confirmed it fixes the bug with no regression. Two things before merge: One blocker: truncated passthrough has no recovery path. On a large all-passing --reporter=verbose run, output is capped at passthrough_max_chars (verified: 80-test suite returns 15 tests) with the truncation marker but no [full output] hint and no tee file, since the existing tee_and_hint is failures-only and the run exits 0. Reuse force_tee_hint or force_tee_tail_hint from src/core/tee.rs (both tee regardless of exit code) so the full output stays recoverable, per the CONTRIBUTING checklist. Avoid double-teeing with the tee_and_hint already in run_test. Test gap. None of the new tests exceed passthrough_max_chars, which is why this slipped through. Add one with input larger than the cap asserting both the marker and the recovery hint. |
Explicit Vitest reporters can produce successful output that exceeds the passthrough cap. Track truncation as structured state and use force_tee_hint so the full verbose output remains recoverable.
|
Thanks @aeppling, fixed in f9469d1. The Vitest passthrough path now carries a truncated flag. When explicit I added a regression test with output over the cap that asserts both the truncation marker and the recovery hint. Verified locally with |
|
LGTM, will be in next release. Thanks for contributing to RTK ! |
Closes #2233.
Summary
--reporterarguments instead of replacing them with--reporter=json.Test plan
cargo fmt --all -- --checkcargo clippy --all-targetscargo test --quiet vitest_cmd::testscargo test --all --quiet