-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
Convert ReactDOMOption to createRoot #28002
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,7 +86,8 @@ const createMatcherFor = (consoleMethod, matcherName) => | |
// doesn't match the number of arguments. | ||
// We'll fail the test if it happens. | ||
let argIndex = 0; | ||
format.replace(/%s/g, () => argIndex++); | ||
// console.* could have been called with a non-string e.g. `console.error(new Error())` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Stray log There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't follow. This comment supposed to explain why we need a string cast here. We used to assume |
||
String(format).replace(/%s/g, () => argIndex++); | ||
if (argIndex !== args.length) { | ||
lastWarningWithMismatchingFormat = { | ||
format, | ||
|
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.
The entire markup is now replaced with client rendering so we need to capture the newly created
option
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.
Oh I guess I should actually read the comment huh