@@ -65,35 +65,35 @@ test('renderAsync supports legacy rendering option', async () => {
6565} ) ;
6666
6767test ( 'rerender function throws error when used with renderAsync' , async ( ) => {
68- const result = await renderAsync ( < Banana /> ) ;
68+ await renderAsync ( < Banana /> ) ;
6969
70- expect ( ( ) => result . rerender ( < Banana /> ) ) . toThrowErrorMatchingInlineSnapshot (
71- `"\` rerender(...)\` is not supported when using \` renderAsync\` use \` await rerenderAsync(...)\` instead"` ,
70+ expect ( ( ) => screen . rerender ( < Banana /> ) ) . toThrowErrorMatchingInlineSnapshot (
71+ `"" rerender(...)" is not supported when using " renderAsync" use " await rerenderAsync(...)" instead"` ,
7272 ) ;
7373} ) ;
7474
7575test ( 'rerenderAsync function updates component asynchronously' , async ( ) => {
7676 const fn = jest . fn ( ) ;
77- const result = await renderAsync ( < Banana onUpdate = { fn } /> ) ;
77+ await renderAsync ( < Banana onUpdate = { fn } /> ) ;
7878 expect ( fn ) . toHaveBeenCalledTimes ( 0 ) ;
7979
80- await result . rerenderAsync ( < Banana onUpdate = { fn } /> ) ;
80+ await screen . rerenderAsync ( < Banana onUpdate = { fn } /> ) ;
8181 expect ( fn ) . toHaveBeenCalledTimes ( 1 ) ;
8282} ) ;
8383
8484test ( 'unmount function throws error when used with renderAsync' , async ( ) => {
85- const result = await renderAsync ( < Banana /> ) ;
85+ await renderAsync ( < Banana /> ) ;
8686
87- expect ( ( ) => result . unmount ( ) ) . toThrowErrorMatchingInlineSnapshot (
88- `"\` unmount()\` is not supported when using \` renderAsync\` use \` await unmountAsync()\` instead"` ,
87+ expect ( ( ) => screen . unmount ( ) ) . toThrowErrorMatchingInlineSnapshot (
88+ `"" unmount()" is not supported when using " renderAsync" use " await unmountAsync()" instead"` ,
8989 ) ;
9090} ) ;
9191
9292test ( 'unmountAsync function unmounts component asynchronously' , async ( ) => {
9393 const fn = jest . fn ( ) ;
94- const result = await renderAsync ( < Banana onUnmount = { fn } /> ) ;
94+ await renderAsync ( < Banana onUnmount = { fn } /> ) ;
9595
96- await result . unmountAsync ( ) ;
96+ await screen . unmountAsync ( ) ;
9797 expect ( fn ) . toHaveBeenCalled ( ) ;
9898} ) ;
9999
0 commit comments