@@ -40,14 +40,14 @@ export async function testQueries() {
4040
4141 // screen queries
4242 screen . getByText ( 'foo' )
43- screen . getByText ( 'foo' )
43+ screen . getByText < HTMLDivElement > ( 'foo' )
4444 screen . queryByText ( 'foo' )
4545 await screen . findByText ( 'foo' )
4646 await screen . findByText ( 'foo' , undefined , { timeout : 10 } )
4747 screen . debug ( screen . getAllByText ( 'bar' ) )
4848 screen . queryAllByText ( 'bar' )
4949 await screen . findAllByText ( 'bar' )
50- await screen . findAllByRole ( 'button' , { name : 'submit' } )
50+ await screen . findAllByRole < HTMLButtonElement > ( 'button' , { name : 'submit' } )
5151 await screen . findAllByText ( 'bar' , undefined , { timeout : 10 } )
5252}
5353
@@ -249,11 +249,11 @@ export async function testWithin() {
249249 container . queryAllByLabelText ( 'Some label' )
250250
251251 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' )
254254
255255 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} )
257257}
258258
259259/*
0 commit comments