import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
import _regeneratorRuntime from "@babel/runtime/regenerator";
import React from 'react';
import { act, render } from '@testing-library/react';
import { IntlProvider } from 'react-intl';
export var renderWithIntl = function renderWithIntl(component) {
  return render( /*#__PURE__*/React.createElement(IntlProvider, {
    locale: "en"
  }, component));
};
export function asyncAct(_x) {
  return _asyncAct.apply(this, arguments);
}
function _asyncAct() {
  _asyncAct = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(cb) {
    return _regeneratorRuntime.wrap(function _callee$(_context) {
      while (1) switch (_context.prev = _context.next) {
        case 0:
          _context.prev = 0;
          _context.next = 3;
          return cb();
        case 3:
          _context.next = 7;
          break;
        case 5:
          _context.prev = 5;
          _context.t0 = _context["catch"](0);
        case 7:
          act(function () {});
        case 8:
        case "end":
          return _context.stop();
      }
    }, _callee, null, [[0, 5]]);
  }));
  return _asyncAct.apply(this, arguments);
}