import { jsx } from "react/jsx-runtime";
import { render } from "@testing-library/react";
import { createMemoryHistory } from "history";
import { AppRouter } from "../../view/app-router.js";
const renderWithRouter = (ui, {
  route = "/",
  history = createMemoryHistory({ initialEntries: [route] })
} = {}) => {
  const renderResult = render(/* @__PURE__ */ jsx(AppRouter, { history, children: ui }));
  return {
    ...renderResult,
    // adding `history` to the returned utilities to allow us
    // to reference it in our tests (just try to avoid using
    // this to test implementation details).
    history
  };
};
export {
  renderWithRouter
};
