Skip to content

Commit

Permalink
create files for other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
avertrees committed Dec 20, 2024
1 parent cfb7577 commit dc50bd0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
Empty file.
Empty file.
29 changes: 29 additions & 0 deletions __tests__/pages/divisionspage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { render } from "@testing-library/react";
import { axe } from "jest-axe";
import React from "react";
import { mockDivisionsResponse } from "__tests__/__mocks__/data/api/mockDivisionsResponse";
import DivisionsPage from "@/src/components/pages/divisionsPage/divisionsPage";
import { useRouter } from "next/navigation";

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

beforeEach(() => {
(useRouter as jest.Mock).mockImplementation(() => ({
pathname: "/divisions",
}));
});

describe.skip("Divisions page Accessibility", () => {
it("passes axe accessibility test", async () => {
const { container } = render(
<DivisionsPage
summary={mockDivisionsResponse.summary}
divisions={mockDivisionsResponse.divisions}
/>
);
expect(await axe(container)).toHaveNoViolations();
}, 60000);
});

0 comments on commit dc50bd0

Please sign in to comment.