File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ function buildRenderResult(
6363 const instance = renderer . root ;
6464
6565 const update = function ( component : React . ReactElement ) {
66- void act ( ( ) => {
67- renderer . update ( wrap ( component ) ) ;
68- } ) ;
66+ throw new Error (
67+ '` update(...)` is not supported when using `renderAsync` use `await updateAsync(...)` instead' ,
68+ ) ;
6969 } ;
7070 const updateAsync = async function ( component : React . ReactElement ) {
7171 // eslint-disable-next-line require-await
@@ -75,9 +75,9 @@ function buildRenderResult(
7575 } ;
7676
7777 const unmount = ( ) => {
78- void act ( ( ) => {
79- renderer . unmount ( ) ;
80- } ) ;
78+ throw new Error (
79+ '` unmount()` is not supported when using `renderAsync` use `await unmountAsync()` instead' ,
80+ ) ;
8181 } ;
8282 const unmountAsync = async ( ) => {
8383 // eslint-disable-next-line require-await
You can’t perform that action at this time.
0 commit comments