UNPKG

686 BJavaScriptView Raw
1/**
2 * @license React
3 * react-dom-test-utils.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */
10
11"use strict";
12var React = require("react"),
13 didWarnAboutUsingAct = !1;
14exports.act = function (callback) {
15 !1 === didWarnAboutUsingAct &&
16 ((didWarnAboutUsingAct = !0),
17 console.error(
18 "`ReactDOMTestUtils.act` is deprecated in favor of `React.act`. Import `act` from `react` instead of `react-dom/test-utils`. See https://react.dev/warnings/react-dom-test-utils for more info."
19 ));
20 return React.act(callback);
21};