@@ -3,7 +3,7 @@ import {render, fireEvent, screen, waitFor} from '.'
3
3
import * as pure from './pure'
4
4
5
5
export async function testRender ( ) {
6
- const page = render ( < div /> )
6
+ const page = render ( < button /> )
7
7
8
8
// single queries
9
9
page . getByText ( 'foo' )
@@ -22,7 +22,7 @@ export async function testRender() {
22
22
}
23
23
24
24
export async function testPureRender ( ) {
25
- const page = pure . render ( < div /> )
25
+ const page = pure . render ( < button /> )
26
26
27
27
// single queries
28
28
page . getByText ( 'foo' )
@@ -43,8 +43,9 @@ export async function testPureRender() {
43
43
export function testRenderOptions ( ) {
44
44
const container = document . createElement ( 'div' )
45
45
const options = { container}
46
- const { container : returnedContainer } = render ( < div /> , options )
47
- // Unclear why TypeScript infers `HTMLElement` here when the the input `container` is `HTMLDivElement`
46
+ const { container : returnedContainer } = render ( < button /> , options )
47
+ // Unclear why TypeScript infers `HTMLElement` here when the the input `container` is `HTMLDivElement`.
48
+ // It's working for `testSVGRenderOptions`.
48
49
// Hopefully this breaks someday and we can switch to
49
50
// expectType<HTMLDivElement, typeof returnedContainer>(returnedContainer)
50
51
expectType < HTMLElement , typeof returnedContainer > ( returnedContainer )
@@ -56,7 +57,7 @@ export function testSVGRenderOptions() {
56
57
'svg' ,
57
58
)
58
59
const options = { container}
59
- const { container : returnedContainer } = render ( < svg /> , options )
60
+ const { container : returnedContainer } = render ( < path /> , options )
60
61
expectType < SVGSVGElement , typeof returnedContainer > ( returnedContainer )
61
62
}
62
63
0 commit comments