"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.renderWithRouter = renderWithRouter;
var _react = require("@testing-library/react");
var _reactRouterDom = require("react-router-dom");
var _jsxRuntime = require("react/jsx-runtime");
function renderWithRouter(ui) {
  let _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
    _ref$route = _ref.route,
    route = _ref$route === void 0 ? '/' : _ref$route,
    state = _ref.state;
  const initialEntry = state ? [{
    pathname: route,
    state
  }] : [route];
  return (0, _react.render)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
    initialEntries: initialEntry,
    children: ui
  }));
}