react-dom-test-utils.development.js 793 B

123456789101112131415161718192021222324
  1. /**
  2. * @license React
  3. * react-dom-test-utils.development.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. "use strict";
  11. "production" !== process.env.NODE_ENV &&
  12. (function () {
  13. var React = require("react"),
  14. didWarnAboutUsingAct = !1;
  15. exports.act = function (callback) {
  16. !1 === didWarnAboutUsingAct &&
  17. ((didWarnAboutUsingAct = !0),
  18. console.error(
  19. "`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."
  20. ));
  21. return React.act(callback);
  22. };
  23. })();