Skip to content

fix(summaryReporter): add back broken error reporting and make log reporting optional for summaryReporter #2932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MichaelWest22
Copy link

What I did

  1. Added back support for reporting a summary of errors in summaryReporter
  2. Added option to turn off log reporting in summaryReporter

I found that in #2126 the option to add log reporting was enabled but it also replaced the logger with the reportTestFileResults BufferedLogger. However this logger flushes its log buffer as soon as reportTestFileResults stage finishes and then this logger is used for Error reporting in onTestRunFinished() and this reporting now just goes to a buffer that is never flushed. I resolved this issue by moving the error reporting logging back to TestRunnerLogger. This change could be a breaking change to some users who have worked around the lack of error reporting so I had to add a flag to enable it that defaults to false to retain existing broken behavior.

Also it is often useful to combine multiple reporters and if other reporters have log reporting like the defaultReporter it can double up log reporting in some combinations so I added a flag to optionally turn this off if needed.

Copy link

changeset-bot bot commented Apr 16, 2025

🦋 Changeset detected

Latest commit: 7aedbaa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web/test-runner Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@MichaelWest22 MichaelWest22 changed the title add back broken error reporting and make log reporting optional for summaryReporter fix(summaryReporter): add back broken error reporting and make log reporting optional for summaryReporter Apr 16, 2025
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.

1 participant