Skip to content

Commit

Permalink
Add jest/mock functions for Jest test issue
Browse files Browse the repository at this point in the history
  • Loading branch information
maxxcrawford committed Jul 25, 2023
1 parent 3353502 commit 084d7ba
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import { composeStory } from "@storybook/react";
import { axe } from "jest-axe";
import Meta, { Dashboard } from "./Dashboard.stories";

jest.mock("next/navigation", () => ({
useRouter: jest.fn(),
usePathname: jest.fn(),
}));

it("passes the axe accessibility test suite", async () => {
const ComposedDashboard = composeStory(Dashboard, Meta);
const { container } = render(<ComposedDashboard />);
Expand Down

0 comments on commit 084d7ba

Please sign in to comment.