Skip to content

Commit eba6eea

Browse files
authored
docs: add guiding principles to README
2 parents aaf5ec7 + a219f43 commit eba6eea

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ to maintain.
4949
* [Using with Typescript](#using-with-typescript)
5050
* [Inspiration](#inspiration)
5151
* [Other Solutions](#other-solutions)
52+
* [Guiding Principles](#guiding-principles)
5253
* [Contributors](#contributors)
5354
* [LICENSE](#license)
5455

@@ -199,6 +200,21 @@ independent from jest, and can be used with other tests runners as well.
199200
I'm not aware of any, if you are please [make a pull request][prs] and add it
200201
here!
201202

203+
## Guiding Principles
204+
205+
> [The more your tests resemble the way your software is used, the more confidence they can give you.][guiding-principle]
206+
207+
This library follows the same guiding principles as its mother library [dom-testing-library][].
208+
Go [check them out](https://github.com/kentcdodds/dom-testing-library#guiding-principles)
209+
for more details.
210+
211+
Additionally, with respect to custom DOM matchers, this library aims to maintain
212+
a minimal but useful set of them, while avoiding bloating itself with merely
213+
convenient ones that can be easily achieved with other APIs. In general, the
214+
overall criteria for what is considered a useful custom matcher to add to this
215+
library, is that doing the equivalent assertion on our own makes the test code
216+
more verbose, less clear in its intent, and/or harder to read.
217+
202218
## Contributors
203219

204220
Thanks goes to these people ([emoji key][emojis]):
@@ -247,3 +263,4 @@ MIT
247263
[twitter-badge]: https://img.shields.io/twitter/url/https/github.com/gnapse/jest-dom.svg?style=social
248264
[emojis]: https://github.com/kentcdodds/all-contributors#emoji-key
249265
[all-contributors]: https://github.com/kentcdodds/all-contributors
266+
[guiding-principle]: https://twitter.com/kentcdodds/status/977018512689455106

0 commit comments

Comments
 (0)