Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Log unexpected warnings when testing with ReactDOMServerIntegrationTe…
…stUtils
  • Loading branch information
eps1lon committed May 11, 2022
commit aed6ac48160bcc63888b31a4b72b3c1d9448b2e6
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ module.exports = function(initModules) {
console.log(
`We expected ${count} warning(s), but saw ${filteredWarnings.length} warning(s).`,
);
if (filteredWarnings.count > 0) {
if (filteredWarnings.length > 0) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drive-by fix that was required to get hydration mismatch warnings during development. This adds some noise to this test since there are a bunch of tests that expect more warnings than there actually are.

I started working on them by switching to toErrorDev instead and it's a lot of work to fully switch. Though it revealed some odd error messages and that you also hit #22797 in your tests. So definitely worth pursuing IMO.

console.log(`We saw these warnings:`);
for (let i = 0; i < filteredWarnings.length; i++) {
console.log(...filteredWarnings[i]);
Expand Down