chore: add single versioned implementation of act for DevTools tests (#28186)

- Moving `act` implementation to a single getter-function, which is
based on React version we are testing RDT against.
- Removing unused mocks for `act`, which were designed for legacy
versions of React, validated with running tests against React 16 build.

DiffTrain build for commit https://github.com/facebook/react/commit/9a1db2d21fac88a42094fa3fc266d1692551a5bd.
This commit is contained in:
hoxyq
2024-02-05 15:43:23 +00:00
parent 24994aeac9
commit 91a20f5bb2
7 changed files with 9 additions and 9 deletions
@@ -25622,7 +25622,7 @@ if (__DEV__) {
return root;
}
var ReactVersion = "18.3.0-canary-56cd10beb-20240205";
var ReactVersion = "18.3.0-canary-9a1db2d21-20240205";
// Might add PROFILE later.
@@ -9171,7 +9171,7 @@ var devToolsConfig$jscomp$inline_1012 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-56cd10beb-20240205",
version: "18.3.0-canary-9a1db2d21-20240205",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1190 = {
@@ -9202,7 +9202,7 @@ var internals$jscomp$inline_1190 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-56cd10beb-20240205"
reconcilerVersion: "18.3.0-canary-9a1db2d21-20240205"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1191 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -9599,7 +9599,7 @@ var devToolsConfig$jscomp$inline_1054 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-56cd10beb-20240205",
version: "18.3.0-canary-9a1db2d21-20240205",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1231 = {
@@ -9630,7 +9630,7 @@ var internals$jscomp$inline_1231 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-56cd10beb-20240205"
reconcilerVersion: "18.3.0-canary-9a1db2d21-20240205"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1232 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
@@ -24,7 +24,7 @@ if (__DEV__) {
) {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.0-canary-56cd10beb-20240205";
var ReactVersion = "18.3.0-canary-9a1db2d21-20240205";
// ATTENTION
// When adding new symbols to this file,
@@ -545,4 +545,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-56cd10beb-20240205";
exports.version = "18.3.0-canary-9a1db2d21-20240205";
@@ -541,7 +541,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-56cd10beb-20240205";
exports.version = "18.3.0-canary-9a1db2d21-20240205";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
@@ -1 +1 @@
56cd10beb40586d09e91157e8f6ac531478a62be
9a1db2d21fac88a42094fa3fc266d1692551a5bd