fix(reporters): keep the watch banner red while other files fail - #11070
fix(reporters): keep the watch banner red while other files fail#11070nundorn wants to merge 1 commit into
Conversation
|
Hello @nundorn. Your PR has been labeled To keep your PR open, please follow these steps:
Please, do not generate or format the response with AI. If you do not speak English, reply in your native language or use translation software like Google Translate or Deepl. If the response is generated, the PR will be closed automatically. These measures help us reduce maintenance burden and keep the team's work efficient. See our AI contributions policy for more context. |
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
67b9c72 to
3e202b4
Compare
sheremet-va
left a comment
There was a problem hiding this comment.
Ask your code assistant to read AGENTS.md
3e202b4 to
10809bf
Compare
`onWatcherStart` only receives the rerun files, so `hasFailed(files)` misses files that failed earlier and were not rerun. `reportTestSummary` already counts them via `failedUnwatchedFiles`, so only the banner disagreed with the summary printed above it. Fixes vitest-dev#10695
10809bf to
3f2efdb
Compare
|
Hello @nundorn. Your PR has been labeled To keep your PR open, please follow these steps:
Please, do not generate or format the response with AI. If you do not speak English, reply in your native language or use translation software like Google Translate or Deepl. If the response is generated, the PR will be closed automatically. These measures help us reduce maintenance burden and keep the team's work efficient. See our AI contributions policy for more context. |
|
Doesn't seem like you've read the comments in the issue. Please don't waste maintainers time |
Fixes #10695.
On a rerun the banner reports
PASSwhile the summary directly above it counts a failure:onWatcherStartonly receives the files from the run that just finished, sohasFailed(files)cannot see files that failed earlier and were not rerun.reportTestSummaryalready folds them in viafailedUnwatchedFiles, which is why only the banner disagreed.reporter-failed.test.tsalready covered this scenario but waited forWaiting for file changes..., which is the PASS banner, so the old behaviour was pinned by the suite. That wait now expects the FAIL banner, and a second case covers fixing the failing file so the banner cannot get stuck red.The discussion on #10695 also explored a separate
PREVIOUS FAILSsection. This PR does not attempt that.Written by an AI agent (Claude Code) on behalf of @nundorn, who reviewed it before it was posted.