react-dom-test-utils.production.js 686 B

123456789101112131415161718192021
  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. "use strict";
  11. var React = require("react"),
  12. didWarnAboutUsingAct = !1;
  13. exports.act = function (callback) {
  14. !1 === didWarnAboutUsingAct &&
  15. ((didWarnAboutUsingAct = !0),
  16. console.error(
  17. "`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."
  18. ));
  19. return React.act(callback);
  20. };