File tree Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Expand file tree Collapse file tree 2 files changed +9
-14
lines changed Original file line number Diff line number Diff line change 4848 "@babel/runtime" : " ^7.12.5"
4949 },
5050 "devDependencies" : {
51- "@testing-library/dom" : " ^10.0.0 " ,
51+ "@testing-library/dom" : " https://pkg.csb.dev/testing-library/dom-testing-library/commit/8abda5aa/@testing-library/dom " ,
5252 "@testing-library/jest-dom" : " ^5.11.6" ,
5353 "@types/react" : " ^19.0.0" ,
5454 "@types/react-dom" : " ^19.0.0" ,
6363 "typescript" : " ^5.9.3"
6464 },
6565 "peerDependencies" : {
66- "@testing-library/dom" : " ^10 .0.0" ,
66+ "@testing-library/dom" : " ^11 .0.0" ,
6767 "@types/react" : " ^18.0.0 || ^19.0.0" ,
6868 "@types/react-dom" : " ^18.0.0 || ^19.0.0" ,
6969 "react" : " ^18.0.0 || ^19.0.0" ,
Original file line number Diff line number Diff line change @@ -32,18 +32,14 @@ async function waitForMicrotasks() {
3232
3333configureDTL ( {
3434 unstable_advanceTimersWrapper : async scope => {
35- if ( getIsReactActEnvironment ( ) ) {
36- return actIfEnabled ( scope )
37- } else {
38- const result = await scope ( )
39- await waitForMicrotasks ( )
40- return result
41- }
35+ const result = await scope ( )
36+ await waitForMicrotasks ( )
37+ return result
4238 } ,
43- // We just want to run `waitFor` without IS_REACT_ACT_ENVIRONMENT
44- // But that's not necessarily how ` asyncWrapper` is used since it's a public method.
45- // Let's just hope nobody else is using it.
46- asyncWrapper : async cb => {
39+ eventWrapper : actIfEnabled ,
40+ asyncWrapper : actIfEnabled ,
41+ // Run `waitFor` without IS_REACT_ACT_ENVIRONMENT
42+ waitForWrapper : async cb => {
4743 const previousActEnvironment = getIsReactActEnvironment ( )
4844 setIsReactActEnvironment ( false )
4945 try {
@@ -52,7 +48,6 @@ configureDTL({
5248 setIsReactActEnvironment ( previousActEnvironment )
5349 }
5450 } ,
55- eventWrapper : actIfEnabled ,
5651} )
5752
5853// Ideally we'd just use a WeakMap where containers are keys and roots are values.
You can’t perform that action at this time.
0 commit comments