Skip to content

Commit a66e63b

Browse files
authored
Merge pull request #107 from TAGraves/tg-clarify-find-docs
Clarifies the behavior of test renderer's find methods
2 parents 3b74f67 + 18000f1 commit a66e63b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/docs/reference-test-renderer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,23 +158,23 @@ Returns the root "test instance" object that is useful for making assertions abo
158158
testInstance.find(test)
159159
```
160160

161-
Find the first descendant test instance for which `test(testInstance)` returns `true`.
161+
Find a single descendant test instance for which `test(testInstance)` returns `true`. If `test(testInstance)` does not return `true` for exactly one test instance, it will throw an error.
162162

163163
### `testInstance.findByType()`
164164

165165
```javascript
166166
testInstance.findByType(type)
167167
```
168168

169-
Find the first descendant test instance with the provided `type`.
169+
Find a single descendant test instance with the provided `type`. If there is not exactly one test instance with the provided `type`, it will throw an error.
170170

171171
### `testInstance.findByProps()`
172172

173173
```javascript
174174
testInstance.findByProps(props)
175175
```
176176

177-
Find the first descendant test instance with the provided `props`.
177+
Find a single descendant test instance with the provided `props`. If there is not exactly one test instance with the provided `props`, it will throw an error.
178178

179179
### `testInstance.findAll()`
180180

0 commit comments

Comments
 (0)