-
-
Notifications
You must be signed in to change notification settings - Fork 32.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
[docs] Update testing guide #21863
[docs] Update testing guide #21863
Conversation
it's least interesting for a user. more a nice-to-know
Regarding the migration, I wonder if we should add a depreciation warning on v4. Covering it in https://next.material-ui.com/guides/migration-v4/ will help. |
} | ||
We recommend testing your application without tying the tests too close to Material-UI. | ||
This is how we test our components internally. | ||
A library that has a first-class API for this approach is [`@testing-library/react`](https://testing-library.com/docs/react-testing-library/intro). |
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.
I wonder if this sentence should come at the end of the section, after the approach has been fully explained? The prior sentences only allude to what not to do...
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.
That makes more sense 👍 I moved it after the example.
Yes. This is what I've been trying to explain. We can do breaking changes first and then later (and separately) work on deprecations. |
Co-authored-by: Matt <[email protected]>
Agree, so:
|
I don't know how else to explain. I make every breaking change on |
@eps1lon I don't have any strong points of view on this, your approach is worth pushing further. My previous comment was meant to share what seems/could to be easier for us (I'm not saying it is). But I'm wondering if spending time on helping v4 to v5 migration outside of the markdown migration guide has a positive ROI in the first place. I guess we will get feedback, and act based on it. So v5 first, then v4 -> v5 as/if we get feedback, sounds like a possible great strategy. |
@oliviertassinari The complication with @mnajdova's PR was simply that we started to do it one way, then switched to doing it another.
Not "as we get feedback", it's just a separate task. (Unless you're suggesting that we don't provide deprecation warnings by default?) |
I'm secretly hoping that we can get away without these deprecation messages. But yeah, I doubt it, so "separate task" sounds great. |
There's not much we can add here since none of the examples would be Material-UI specific.
App tests focus more on high level stuff on which we can't advise much. Just don't rely on internals.
It's probably the least important part of that page.
Closes #17070