-
Notifications
You must be signed in to change notification settings - Fork 728
docs: Add 'What this library can't test' section #575
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
Conversation
…ction docs(intro): add 'What this library cant test' section
Technically these things can be tested, but only indirectly (unlike Enzyme, testing library doesn't provide APIs for accessing them directly). Maybe we could word it so it's more about avoiding testing internals by not supporting APIs like that, similar to what's in the docs but a bit simpler and easier to learn at a glance. I still think these are three good topics though. |
Sounds fair and reasonable, @nickmccurdy. What you should avoid with Testing LibraryTesting Library encourage you to avoid testing internals of the component (though you can test them). The Guiding Principles of this library emphasize on tests that closely resemble how your web pages are interacted by the users. You may want to avoid following internals for testing -
If this adds value to developers then I can update PR. |
I'm ok with including something like this, but not on this page. DOM Testing Library doesn't really have anything to do with components directly. That's a framework-specific thing. |
Feel free to reuse this content from an old article I wrote: https://medium.com/@alexkrolick/what-makes-a-good-test-dff3df6058a2#0843 |
@kentcdodds - This will be right below |
Ah, yeah, that makes sense 👍 |
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 made a few minor modifications. Thanks!
@all-contributors please add @kalpeshsingh for docs |
I've put up a pull request to add @kalpeshsingh! 🎉 |
This PR is regarding #574 issue.
This will help newbies developers to understand the purpose of the library and what is not expected out of it.
This will help developers to understand guiding principles better.