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(
63
63
const instance = renderer . root ;
64
64
65
65
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
+ ) ;
69
69
} ;
70
70
const updateAsync = async function ( component : React . ReactElement ) {
71
71
// eslint-disable-next-line require-await
@@ -75,9 +75,9 @@ function buildRenderResult(
75
75
} ;
76
76
77
77
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
+ ) ;
81
81
} ;
82
82
const unmountAsync = async ( ) => {
83
83
// eslint-disable-next-line require-await
You can’t perform that action at this time.
0 commit comments