@@ -65,35 +65,35 @@ test('renderAsync supports legacy rendering option', async () => {
65
65
} ) ;
66
66
67
67
test ( 'rerender function throws error when used with renderAsync' , async ( ) => {
68
- const result = await renderAsync ( < Banana /> ) ;
68
+ await renderAsync ( < Banana /> ) ;
69
69
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"` ,
72
72
) ;
73
73
} ) ;
74
74
75
75
test ( 'rerenderAsync function updates component asynchronously' , async ( ) => {
76
76
const fn = jest . fn ( ) ;
77
- const result = await renderAsync ( < Banana onUpdate = { fn } /> ) ;
77
+ await renderAsync ( < Banana onUpdate = { fn } /> ) ;
78
78
expect ( fn ) . toHaveBeenCalledTimes ( 0 ) ;
79
79
80
- await result . rerenderAsync ( < Banana onUpdate = { fn } /> ) ;
80
+ await screen . rerenderAsync ( < Banana onUpdate = { fn } /> ) ;
81
81
expect ( fn ) . toHaveBeenCalledTimes ( 1 ) ;
82
82
} ) ;
83
83
84
84
test ( 'unmount function throws error when used with renderAsync' , async ( ) => {
85
- const result = await renderAsync ( < Banana /> ) ;
85
+ await renderAsync ( < Banana /> ) ;
86
86
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"` ,
89
89
) ;
90
90
} ) ;
91
91
92
92
test ( 'unmountAsync function unmounts component asynchronously' , async ( ) => {
93
93
const fn = jest . fn ( ) ;
94
- const result = await renderAsync ( < Banana onUnmount = { fn } /> ) ;
94
+ await renderAsync ( < Banana onUnmount = { fn } /> ) ;
95
95
96
- await result . unmountAsync ( ) ;
96
+ await screen . unmountAsync ( ) ;
97
97
expect ( fn ) . toHaveBeenCalled ( ) ;
98
98
} ) ;
99
99
0 commit comments