Socket
Book a DemoInstallSign in
Socket

@homebound/rtl-react-router-utils

Package Overview
Dependencies
Maintainers
43
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@homebound/rtl-react-router-utils

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

latest
npmnpm
Version
1.2.0
Version published
Weekly downloads
49
-72.16%
Maintainers
43
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 25 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts