Skip to content

fix(reporters): summary to intercept logger's streams even when they are not process.std* streams#10340

Merged
hi-ogawa merged 2 commits into
vitest-dev:mainfrom
AriPerkkio:fix/summary-without-process-stdout
May 15, 2026
Merged

fix(reporters): summary to intercept logger's streams even when they are not process.std* streams#10340
hi-ogawa merged 2 commits into
vitest-dev:mainfrom
AriPerkkio:fix/summary-without-process-stdout

Conversation

@AriPerkkio

@AriPerkkio AriPerkkio commented May 13, 2026

Copy link
Copy Markdown
Member

Description

While adding test cases for summary reporter, I noticed bug around window rendered. It's really edge-case bug that happens only when using Node API and passing custom stdout/stderr while using summary reporter.

So this is more of a test(reporter): summary reporter tests than a fix:, but fix has more priority.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

Comment thread packages/vitest/src/node/reporters/renderers/windowedRenderer.ts Outdated
@netlify

netlify Bot commented May 13, 2026

Copy link
Copy Markdown

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 3671bd5
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/6a044da301150100088b2114
😎 Deploy Preview https://deploy-preview-10340--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

Comment on lines +52 to +53
this.interceptStream(options.logger.outputStream, 'output'),
this.interceptStream(options.logger.errorStream, 'error'),

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This part fixes a bug where virtual buffer would not capture logger.log calls that were made by other reporters when custom VitestOptions.stdout was used.

@AriPerkkio AriPerkkio force-pushed the fix/summary-without-process-stdout branch 2 times, most recently from c600bd2 to b6a933a Compare May 13, 2026 11:20
@AriPerkkio AriPerkkio force-pushed the fix/summary-without-process-stdout branch from b6a933a to db5efcc Compare May 13, 2026 13:31
@AriPerkkio AriPerkkio marked this pull request as ready for review May 13, 2026 13:36
Comment thread packages/vitest/src/node/reporters/summary.ts Outdated
@AriPerkkio AriPerkkio force-pushed the fix/summary-without-process-stdout branch from 6e3bde5 to 88c2423 Compare May 14, 2026 13:16
@hi-ogawa hi-ogawa merged commit f79e7db into vitest-dev:main May 15, 2026
15 of 16 checks passed
@AriPerkkio AriPerkkio deleted the fix/summary-without-process-stdout branch May 19, 2026 08:02
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