@@ -40,14 +40,14 @@ export async function testQueries() {
40
40
41
41
// screen queries
42
42
screen . getByText ( 'foo' )
43
- screen . getByText ( 'foo' )
43
+ screen . getByText < HTMLDivElement > ( 'foo' )
44
44
screen . queryByText ( 'foo' )
45
45
await screen . findByText ( 'foo' )
46
46
await screen . findByText ( 'foo' , undefined , { timeout : 10 } )
47
47
screen . debug ( screen . getAllByText ( 'bar' ) )
48
48
screen . queryAllByText ( 'bar' )
49
49
await screen . findAllByText ( 'bar' )
50
- await screen . findAllByRole ( 'button' , { name : 'submit' } )
50
+ await screen . findAllByRole < HTMLButtonElement > ( 'button' , { name : 'submit' } )
51
51
await screen . findAllByText ( 'bar' , undefined , { timeout : 10 } )
52
52
}
53
53
@@ -249,11 +249,11 @@ export async function testWithin() {
249
249
container . queryAllByLabelText ( 'Some label' )
250
250
251
251
container . getByText ( 'Click me' )
252
- container . getByText ( 'Click me' )
253
- container . getAllByText ( 'Click me' )
252
+ container . getByText < HTMLButtonElement > ( 'Click me' )
253
+ container . getAllByText < HTMLButtonElement > ( 'Click me' )
254
254
255
255
await container . findByRole ( 'button' , { name : / c l i c k m e / i} )
256
- container . getByRole ( 'button' , { name : / c l i c k m e / i} )
256
+ container . getByRole < HTMLButtonElement > ( 'button' , { name : / c l i c k m e / i} )
257
257
}
258
258
259
259
/*
0 commit comments