File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 62
62
"typescript" : " ^4.1.2"
63
63
},
64
64
"peerDependencies" : {
65
- "react" : " ^18.0.0 " ,
66
- "react-dom" : " ^18.0.0 "
65
+ "react" : " ^18.3.0-canary " ,
66
+ "react-dom" : " ^18.3.0-canary "
67
67
},
68
68
"eslintConfig" : {
69
69
"extends" : " ./node_modules/kcd-scripts/eslint.js" ,
Original file line number Diff line number Diff line change 1
1
let asyncAct
2
2
3
- jest . mock ( 'react-dom/test-utils' , ( ) => ( {
4
- act : cb => {
5
- return cb ( )
6
- } ,
7
- } ) )
3
+ jest . mock ( 'react' , ( ) => {
4
+ return {
5
+ ...jest . requireActual ( 'react' ) ,
6
+ act : cb => {
7
+ return cb ( )
8
+ } ,
9
+ }
10
+ } )
8
11
9
12
beforeEach ( ( ) => {
10
13
jest . resetModules ( )
Original file line number Diff line number Diff line change 1
- import * as testUtils from 'react-dom/test-utils '
1
+ import * as React from 'react'
2
2
3
- const domAct = testUtils . act
3
+ const reactAct = React . act
4
4
5
5
function getGlobalThis ( ) {
6
6
/* istanbul ignore else */
@@ -78,7 +78,7 @@ function withGlobalActEnvironment(actImplementation) {
78
78
}
79
79
}
80
80
81
- const act = withGlobalActEnvironment ( domAct )
81
+ const act = withGlobalActEnvironment ( reactAct )
82
82
83
83
export default act
84
84
export {
You can’t perform that action at this time.
0 commit comments