Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
failing test for homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
benhalverson committed Aug 18, 2022
1 parent 0110c21 commit d31eb1b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/pages/download/index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import { axe, toHaveNoViolations } from 'jest-axe';
import DownloadPage, {
DownloadNodeReleases,
} from '../../../src/pages/download';
Expand All @@ -27,6 +28,7 @@ const nodeReleaseData: DownloadNodeReleases = {
},
};

expect.extend(toHaveNoViolations);
describe('Download page', () => {
it('renders correctly', () => {
const { container } = render(
Expand All @@ -44,4 +46,13 @@ describe('Download page', () => {

expect(container).toMatchSnapshot();
});

it('shold have no a11y violations', async () => {
const { container } = render(
<DownloadPage location={window.location} data={nodeReleaseData} />
);
const results = await axe(container);

expect(results).toHaveNoViolations();
});
});

0 comments on commit d31eb1b

Please sign in to comment.