@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");

Readme

Keywords

none

Package Sidebar

Install

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

Weekly Downloads

45

Version

1.2.0

License

ISC

Unpacked Size

5.68 kB

Total Files

6

Last publish

Collaborators

  • lbittencurthb
  • maasha
  • jcharpentier
  • sneal88
  • kyeh
  • icampbellsmith
  • msoja-homebound
  • pmishra40
  • fmendeshb
  • arvinsiva
  • bholmes_hb
  • blimmer-
  • zgavin
  • hbitaccounts
  • levi-huynh
  • nbhargava-hb
  • apattersonatx-hb
  • pstone
  • lmunoz_homebound
  • allangaldino
  • eplata.homebound
  • roberth-gomez
  • dmcgarry
  • khalidwilliams
  • atrujillo
  • tylerr909_h
  • zovington
  • blambillottehomebound
  • shaberman
  • larryhomebound
  • cfrazier91
  • foxy
  • homebound-publisher
  • bdow
  • kskano
  • ghaislip