Skip to content

Commit c4ed963

Browse files
authored
Merge branch 'main' into feat/react-19
2 parents 1a3e987 + edb6344 commit c4ed963

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1362,6 +1362,15 @@
13621362
"contributions": [
13631363
"code"
13641364
]
1365+
},
1366+
{
1367+
"login": "trappar",
1368+
"name": "Jeff Way",
1369+
"avatar_url": "https://avatars.githubusercontent.com/u/525726?v=4",
1370+
"profile": "https://github.com/trappar",
1371+
"contributions": [
1372+
"code"
1373+
]
13651374
}
13661375
],
13671376
"contributorsPerLine": 7,

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,7 @@ Thanks goes to these people ([emoji key][emojis]):
631631
<tr>
632632
<td align="center" valign="top" width="14.28%"><a href="http://cmdcolin.github.io"><img src="https://avatars.githubusercontent.com/u/6511937?v=4?s=100" width="100px;" alt="Colin Diesh"/><br /><sub><b>Colin Diesh</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=cmdcolin" title="Documentation">📖</a></td>
633633
<td align="center" valign="top" width="14.28%"><a href="http://yinm.info"><img src="https://avatars.githubusercontent.com/u/13295106?v=4?s=100" width="100px;" alt="Yusuke Iinuma"/><br /><sub><b>Yusuke Iinuma</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=yinm" title="Code">💻</a></td>
634+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/trappar"><img src="https://avatars.githubusercontent.com/u/525726?v=4?s=100" width="100px;" alt="Jeff Way"/><br /><sub><b>Jeff Way</b></sub></a><br /><a href="https://github.com/testing-library/react-testing-library/commits?author=trappar" title="Code">💻</a></td>
634635
</tr>
635636
</tbody>
636637
</table>

types/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export type RenderResult<
3939
maxLength?: number,
4040
options?: prettyFormat.OptionsReceived,
4141
) => void
42-
rerender: (ui: React.ReactElement) => void
42+
rerender: (ui: React.ReactNode) => void
4343
unmount: () => void
4444
asFragment: () => DocumentFragment
4545
} & {[P in keyof Q]: BoundFunction<Q[P]>}
@@ -85,7 +85,7 @@ export interface RenderOptions<
8585
*
8686
* @see https://testing-library.com/docs/react-testing-library/api/#wrapper
8787
*/
88-
wrapper?: React.JSXElementConstructor<{children: React.ReactElement}>
88+
wrapper?: React.JSXElementConstructor<{children: React.ReactNode}>
8989
}
9090

9191
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
@@ -98,11 +98,11 @@ export function render<
9898
Container extends Element | DocumentFragment = HTMLElement,
9999
BaseElement extends Element | DocumentFragment = Container,
100100
>(
101-
ui: React.ReactElement,
101+
ui: React.ReactNode,
102102
options: RenderOptions<Q, Container, BaseElement>,
103103
): RenderResult<Q, Container, BaseElement>
104104
export function render(
105-
ui: React.ReactElement,
105+
ui: React.ReactNode,
106106
options?: Omit<RenderOptions, 'queries'>,
107107
): RenderResult
108108

types/test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,18 +123,18 @@ export function testQueries() {
123123
}
124124

125125
export function wrappedRender(
126-
ui: React.ReactElement,
126+
ui: React.ReactNode,
127127
options?: pure.RenderOptions,
128128
) {
129-
const Wrapper = ({children}: {children: React.ReactElement}): JSX.Element => {
129+
const Wrapper = ({children}: {children: React.ReactNode}): JSX.Element => {
130130
return <div>{children}</div>
131131
}
132132

133133
return pure.render(ui, {wrapper: Wrapper, ...options})
134134
}
135135

136136
export function wrappedRenderB(
137-
ui: React.ReactElement,
137+
ui: React.ReactNode,
138138
options?: pure.RenderOptions,
139139
) {
140140
const Wrapper: React.FunctionComponent<{children?: React.ReactNode}> = ({
@@ -147,7 +147,7 @@ export function wrappedRenderB(
147147
}
148148

149149
export function wrappedRenderC(
150-
ui: React.ReactElement,
150+
ui: React.ReactNode,
151151
options?: pure.RenderOptions,
152152
) {
153153
interface AppWrapperProps {

0 commit comments

Comments
 (0)