Fail tests if unasserted console calls contain undefined#34191
Merged
eps1lon merged 2 commits intofacebook:mainfrom Aug 13, 2025
Merged
Fail tests if unasserted console calls contain undefined#34191eps1lon merged 2 commits intofacebook:mainfrom
undefined#34191eps1lon merged 2 commits intofacebook:mainfrom
Conversation
|
Comparing: 0422a00...85e2c99 Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) |
26d16ab to
aba2390
Compare
aba2390 to
85e2c99
Compare
eps1lon
commented
Aug 12, 2025
Comment on lines
+385
to
+386
| typeof expectedMessage === 'string' && | ||
| (normalizedMessage === expectedMessage || |
Collaborator
Author
There was a problem hiding this comment.
This forbids console.error('undefined') and assertConsoleErrorDev([undefined]) but that doesn't seem like a valid scenario anyway.
sebmarkbage
approved these changes
Aug 13, 2025
This was referenced Aug 13, 2025
github-actions bot
pushed a commit
to code/lib-react
that referenced
this pull request
Aug 16, 2025
…34191) DiffTrain build for [9433fe3](facebook@9433fe3)
github-actions bot
pushed a commit
to code/lib-react
that referenced
this pull request
Aug 16, 2025
…34191) DiffTrain build for [9433fe3](facebook@9433fe3)
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.
Noticed in https://github.com/facebook/react/pull/34189/files#diff-9a24629ff29cdf7a1ee0bf2b99c1db18743b46bbc6d0a204f73042ae44b0bb3bR199 that the test was passing without asserting on the
TypeError. Was just another JS type coercion bug.