Skip to content

Conversation

@eps1lon
Copy link
Member

@eps1lon eps1lon commented Mar 9, 2020

react@next leverages the formatting signature of console.error (console.error(message, ...substitutions)) when checking prop-types. This makes consoleErrorMock.args() more brittle.

We want to match against the error message anyway so we switch from args() to messages(). It should return the same output as one would see in the browser (node uses util.format so we use an implementation of util.format that works in the browser).

@eps1lon eps1lon added the test label Mar 9, 2020
@mui-pr-bot
Copy link

mui-pr-bot commented Mar 9, 2020

No bundle size changes comparing d47c518...85689cf

Generated by 🚫 dangerJS against 85689cf

@eps1lon eps1lon merged commit 026fea2 into mui:master Mar 10, 2020
@eps1lon eps1lon deleted the test/react-next branch March 10, 2020 00:40
EsoterikStare pushed a commit to EsoterikStare/material-ui that referenced this pull request Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants