@homebound/rtl-react-router-utils
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

rtl-react-router-utils

A withRouter helper for using with rtl-utils.

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

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

A withRoute helper for using with rtl-utils.

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

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

/@homebound/rtl-react-router-utils/

    Package Sidebar

    Install

    npm i @homebound/rtl-react-router-utils

    Weekly Downloads

    68

    Version

    1.2.0

    License

    ISC

    Unpacked Size

    5.68 kB

    Total Files

    6

    Last publish

    Collaborators

    • apattersonatx-hb
    • dmcgarry
    • zovington
    • shaberman
    • larryhomebound
    • cfrazier91
    • foxy
    • homebound-publisher
    • blimmer-
    • ghaislip
    • roberth-gomez
    • hbitaccounts
    • blambillottehomebound
    • nbhargava-hb
    • arvinsiva
    • allangaldino
    • tyambaohb
    • icampbellsmith
    • zgavin
    • pmishra40
    • kyeh
    • marcin_soja
    • galonso_homebound