@homebound/rtl-react-router-utils

A `withRouter` helper for using with `rtl-utils`.

Usage no npm install needed!

<script type="module">
  import homeboundRtlReactRouterUtils from 'https://cdn.skypack.dev/@homebound/rtl-react-router-utils';
</script>

README

rtl-react-router-utils

A withRouter helper for using with rtl-utils.

import { withRouter } from "@homebound/rtl-react-router-utils";

const router = withRouter("/currentPage", "/:path");
const { button } = await render(
  <FooPage />,
  router);
click(button);
expect(router.history.location.pathname).toEqual("/somethingElse");