File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 51
51
},
52
52
"devDependencies" : {
53
53
"@testing-library/jest-dom" : " ^5.11.6" ,
54
+ "@types/react" : " ^18.3.1" ,
54
55
"chalk" : " ^4.1.2" ,
55
56
"dotenv-cli" : " ^4.0.0" ,
56
57
"jest-diff" : " ^29.7.0" ,
57
58
"kcd-scripts" : " ^13.0.0" ,
58
59
"npm-run-all" : " ^4.1.5" ,
59
- "react" : " ^18.3.0 " ,
60
+ "react" : " ^18.3.1 " ,
60
61
"react-dom" : " ^18.3.0" ,
61
62
"rimraf" : " ^3.0.2" ,
62
63
"typescript" : " ^4.1.2"
Original file line number Diff line number Diff line change 7
7
prettyFormat ,
8
8
Config as ConfigDTL ,
9
9
} from '@testing-library/dom'
10
- import { act as reactAct } from 'react-dom/test-utils'
10
+ import { act as reactDeprecatedAct } from 'react-dom/test-utils'
11
+ import { act as reactAct } from 'react'
11
12
12
13
export * from '@testing-library/dom'
13
14
@@ -245,10 +246,10 @@ export function renderHook<
245
246
export function cleanup ( ) : void
246
247
247
248
/**
248
- * Simply calls ReactDOMTestUtils .act(cb)
249
+ * Simply calls React .act(cb)
249
250
* If that's not available (older version of react) then it
250
- * simply calls the given callback immediately
251
+ * simply calls the deprecated version which is ReactTestUtils.act(cb)
251
252
*/
252
253
export const act : typeof reactAct extends undefined
253
- ? ( callback : ( ) => void ) => void
254
+ ? typeof reactDeprecatedAct
254
255
: typeof reactAct
You can’t perform that action at this time.
0 commit comments