Skip to content
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

[core] Better assertion #13035

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Sep 29, 2018

Remove most of the assertion messages. Optimize for test velocity. If you take Facebook and Jest as an example, expect() won't even let you provide an assertion message. I think that it's a great tradeoff. You save time writing and reading the tests at the cost of a more obscure failing message. If you really value error explicitness, better use a different assertion method tuned for one use case than a human written message that can be wrong.

@oliviertassinari oliviertassinari merged commit a4435f8 into mui:master Sep 29, 2018
@oliviertassinari oliviertassinari deleted the remove-assertion-messages branch September 29, 2018 15:28
marcelpanse pushed a commit to marcelpanse/material-ui that referenced this pull request Oct 2, 2018
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.

None yet

1 participant