Skip to content

Commit 37f1328

Browse files
committed
fix: avoid relying on implicit children prop
1 parent efd262c commit 37f1328

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

.all-contributorsrc

+9
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,15 @@
602602
"contributions": [
603603
"doc"
604604
]
605+
},
606+
{
607+
"login": "Josh-Cena",
608+
"name": "Joshua Chen",
609+
"avatar_url": "https://avatars.githubusercontent.com/u/55398995?v=4",
610+
"profile": "https://joshcena.com/",
611+
"contributions": [
612+
"code"
613+
]
605614
}
606615
],
607616
"skipCi": true,

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ library will instead be included as official additions to both `react-testing-li
4646
([PR](https://github.com/callstack/react-native-testing-library/pull/923)) with the intention being
4747
to provide a more cohesive and consistent implementation for our users.
4848

49-
Please be patient as we finalise these changes in the respective testing libraries.
50-
In the mean time you can install `@testing-library/react@^13.1`
49+
Please be patient as we finalise these changes in the respective testing libraries. In the mean time
50+
you can install `@testing-library/react@^13.1`
5151

5252
## Table of Contents
5353

@@ -263,6 +263,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
263263
<td align="center"><a href="https://www.facebook.com/masoud.bonabi"><img src="https://avatars.githubusercontent.com/u/6429009?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Masious</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=masious" title="Documentation">📖</a></td>
264264
<td align="center"><a href="https://github.com/Laishuxin"><img src="https://avatars.githubusercontent.com/u/56504759?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Laishuxin</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=Laishuxin" title="Documentation">📖</a></td>
265265
</tr>
266+
<tr>
267+
<td align="center"><a href="https://joshcena.com/"><img src="https://avatars.githubusercontent.com/u/55398995?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joshua Chen</b></sub></a><br /><a href="https://github.com/testing-library/react-hooks-testing-library/commits?author=Josh-Cena" title="Code">💻</a></td>
268+
</tr>
266269
</table>
267270

268271
<!-- markdownlint-restore -->

src/types/react.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ComponentType } from 'react'
1+
import { ComponentType, ReactNode } from 'react'
22

33
import {
44
RenderHookOptions as BaseRenderHookOptions,
@@ -8,7 +8,11 @@ import {
88
CleanupCallback
99
} from '.'
1010

11-
export type WrapperComponent<TProps> = ComponentType<TProps>
11+
export type WrapperComponent<TProps> = ComponentType<
12+
TProps & {
13+
children: ReactNode
14+
}
15+
>
1216

1317
export type RendererOptions<TProps> = {
1418
wrapper?: WrapperComponent<TProps>

0 commit comments

Comments
 (0)