feat(jest-console): add console buffering to CustomConsole for reporters - #16178
Open
AlpianPPLG wants to merge 3 commits into
Open
feat(jest-console): add console buffering to CustomConsole for reporters#16178AlpianPPLG wants to merge 3 commits into
AlpianPPLG wants to merge 3 commits into
Conversation
Removes deprecated whatwg-encoding@3.1.1 transitive dependency. JSDOM v29 removes this archived package entirely. Fixes jestjs#16000
Adds a new 'Debugging in Chrome' section to provide clear, step-by-step instructions for using Chrome DevTools to debug Jest tests. This addresses the confusion mentioned in issue jestjs#15955 where users struggled to understand how to get Chrome to break on debugger statements. The new section includes: - Step-by-step workflow for Chrome DevTools - Expected outputs at each step - Common troubleshooting issues - Explanation of why --runInBand is required Fixes jestjs#15955
When running a single test file, Jest forces verbose mode, which uses CustomConsole instead of BufferedConsole. CustomConsole.getBuffer() was returning undefined, preventing reporters from accessing console output. This change adds buffer tracking to CustomConsole to both: - Print live to stdout (preserving verbose UX) - Buffer entries so getBuffer() returns populated ConsoleBuffer Reporters can now access console output via TestResult.console in all scenarios (single or multiple test runs). Also updates DefaultReporter to skip printing the console section when running in verbose mode to avoid double-printing output. Closes jestjs#6441
✅ Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds console buffering to CustomConsole so reporters receive console
output even in verbose mode (single-test runs).
Problem
Closes #6441
When running a single test file:
Solution
Added console buffering to CustomConsole:
Changes
Testing
✅ Unit tests pass: 61 tests (6 new)
✅ Build passes
✅ Lint passes