Skip to content

Commit

Permalink
fix router tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chaance committed Jul 10, 2021
1 parent 55d28ed commit 595c035
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/utils/__tests__/polymorphic.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as React from "react";
import { render } from "@testing-library/react";
import type * as Polymorphic from "@reach/utils/polymorphic";
import type { RenderResult } from "@testing-library/react";
import { Link as RouterLink } from "react-router-dom";
import { Link as RouterLink, BrowserRouter } from "react-router-dom";

interface ButtonProps {
isDisabled?: boolean;
Expand Down Expand Up @@ -82,7 +82,7 @@ export function Test() {
const buttonAsLinkRef = React.useRef<React.ElementRef<typeof Link>>(null);

return (
<>
<BrowserRouter>
{/* Button accepts ref */}
<Button ref={buttonRef} />

Expand Down Expand Up @@ -206,7 +206,7 @@ export function Test() {

{/* Button as Anchor (Polymorphic.ForwardRefComponent) accepts requiredProp */}
<Button as={Anchor} requiredProp />
</>
</BrowserRouter>
);
}

Expand Down

0 comments on commit 595c035

Please sign in to comment.