You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 30, 2020. It is now read-only.
BREAKING CHANGE: Release 3.0.0 adds exciting new features like a bundled jest preset, and aligns
more closely to the testing-library guiding principles.
> [The more your tests resemble the way your software is used, the more confidence they can give you.](https://twitter.com/kentcdodds/status/977018512689455106)
114
-
115
-
We try to only expose methods and utilities that encourage you to write tests that closely resemble
116
-
how your apps are used.
117
-
118
-
Utilities are included in this project based on the following guiding principles:
119
-
120
-
1. Rendering React Native components ultimately creates native views, and those views should be
121
-
what you test rather than the React component instances you rendered to make them.
122
-
2. In general, test the way your users use your app. There are instances where you'll need to write
123
-
unit tests, but try your best to write with this first -- the more your tests resemble the way
124
-
your app works, the more confident you'll be with your app.
125
-
3. Be responsible, and remember that testing exists to serve you, not the other way around. If the
126
-
library isn't working for you, contribute to make it work or do something more intuitive. Make
127
-
your tests work for you and your team!
128
-
129
-
In summary, we believe in the principles of `dom-testing-library` and its companion libraries, and
130
-
try to adhere to them as closely as possible. Changes to this library should always consider how
131
-
they relate to what's happening in the other libraries in this family of tools.
132
-
133
111
## Installation
134
112
135
113
This module should be installed in your project's `devDependencies`:
@@ -142,34 +120,15 @@ You will need `react` and `react-native` installed as _dependencies_ in order to
142
120
143
121
## Hooks
144
122
145
-
You can test hooks out of the box with this package as follows:
> [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
134
@@ -190,6 +149,20 @@ In summary, we believe in the principles of `testing-library`, and adhere to the
190
149
possible. At the end of the day, what we want is for this library to be pretty light-weight, simple,
191
150
and understandable.
192
151
152
+
## Inspiration
153
+
154
+
Huge thanks to Kent C. Dodds for evangelizing this approach to testing. We could have never come up
155
+
with this library without him 🙏. Check out his awesome work and learn more about testing with
156
+
confidence at [testingjavascript.com](https://testingjavascript.com/) (you won't regret purchasing
157
+
it), and of course, use this library's big brother, `react-testing-library` for your DOM
158
+
applications as well!
159
+
160
+
The hook testing ability of this library is the same implementation as
161
+
[react-hooks-testing-library](https://github.com/mpeyper/react-hooks-testing-library). The only
162
+
reason it was included in this package is because we need you to import render from us, not the
163
+
`dom-testing-library`, and that's an important blocker. Some day, maybe we'll try to allow use of
164
+
that library with this one somehow.
165
+
193
166
## Contributors
194
167
195
168
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
@@ -202,3 +175,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
202
175
203
176
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors)
204
177
specification. Contributions of any kind welcome!
178
+
179
+
## Docs
180
+
181
+
[**Read The Docs**](https://native-testing-library.com) |
182
+
[Edit the docs](https://github.com/testing-library/native-testing-library-docs)
0 commit comments