-
Notifications
You must be signed in to change notification settings - Fork 50.2k
Fail tests if unasserted console calls contain undefined
#34191
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
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
| typeof expectedMessage === 'string' && | ||
| (normalizedMessage === expectedMessage || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This forbids console.error('undefined') and assertConsoleErrorDev([undefined]) but that doesn't seem like a valid scenario anyway.
…34191) DiffTrain build for [9433fe3](facebook@9433fe3)
…34191) DiffTrain build for [9433fe3](facebook@9433fe3)
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.