File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,21 @@ is also a plugin to use testing-library queries for end-to-end tests in
3939` DOM Testing Library ` works with any environment that provides DOM APIs, such as
4040Jest, Mocha + JSDOM, or a real browser
4141
42+ ### What you should avoid with Testing Library
43+
44+ Testing Library encourages you to avoid testing
45+ [ implementation details] ( https://kentcdodds.com/blog/testing-implementation-details )
46+ like the internals of a component you're testing (though it's still possible).
47+ [ The Guiding Principles] ( /docs/guiding-principles ) of this library emphasize a
48+ focus on tests that closely resemble how your web pages are interacted by the users.
49+
50+ You may want to avoid following implementation details:
51+
52+ 1 . Internal state of a component
53+ 1 . Internal methods of a component
54+ 1 . Lifecycle methods of a component
55+ 1 . Child components
56+
4257[ jest ] : https://jestjs.io
4358[ jsdom ] : https://github.com/jsdom/jsdom
4459[ dom ] : dom-testing-library/intro.md
You can’t perform that action at this time.
0 commit comments