|
42 | 42 | - [Hooks](#hooks)
|
43 | 43 | - [Inspiration](#inspiration)
|
44 | 44 | - [Other Solutions](#other-solutions)
|
| 45 | +- [Guiding Principles](#guiding-principles) |
| 46 | +- [Contributors](#contributors) |
45 | 47 |
|
46 | 48 | <!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
47 | 49 |
|
@@ -167,6 +169,27 @@ The awesome engineers at [Callstack](https://callstack.com/) built a similar pac
|
167 | 169 | If you find yourself needing things like shallow rendering and the ability to query elements
|
168 | 170 | by type and props, you'll definitely want to check it out!
|
169 | 171 |
|
| 172 | +## Guiding Principles |
| 173 | + |
| 174 | +> [The more your tests resemble the way your software is used, the more confidence they can give you.](https://twitter.com/kentcdodds/status/977018512689455106) |
| 175 | +
|
| 176 | +We try to only expose methods and utilities that encourage you to write tests that closely resemble |
| 177 | +how your apps are used. |
| 178 | + |
| 179 | +Utilities are included in this project based on the following guiding principles: |
| 180 | + |
| 181 | +1. If it relates to rendering components, it deals with native views rather than component |
| 182 | + instances, nor should it encourage dealing with component instances. |
| 183 | +2. It should be generally useful for testing the application components in the way the user would |
| 184 | + use it. We are making some trade-offs here because we're using a computer and often a simulated |
| 185 | + environment, but in general, utilities should encourage tests that use the components the way |
| 186 | + they're intended to be used. |
| 187 | +3. Utility implementations and APIs should be simple and flexible. |
| 188 | + |
| 189 | +In summary, we believe in the principles of `testing-library`, and adhere to them as closely as |
| 190 | +possible. At the end of the day, what we want is for this library to be pretty light-weight, simple, |
| 191 | +and understandable. |
| 192 | + |
170 | 193 | ## Contributors
|
171 | 194 |
|
172 | 195 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
0 commit comments