Skip to content

Instantly share code, notes, and snippets.

@mariocsantos
Created January 10, 2021 17:18
Show Gist options
  • Save mariocsantos/2e5f63908b71fc362ba92fd117c49512 to your computer and use it in GitHub Desktop.
Save mariocsantos/2e5f63908b71fc362ba92fd117c49512 to your computer and use it in GitHub Desktop.
Favorites food search violations test
import React from 'react';
import { render } from '@testing-library/react';
import { axe, toHaveNoViolations } from 'jest-axe';
import { FavoriteFoodSearch } from '../FavoriteFoodSearch';
expect.extend(toHaveNoViolations)
describe('FavoriteFoodSearch', () => {
it('should not fail any accessibility tests', async () => {
const { container } = render(<FavoriteFoodSearch />);
expect(await axe(container)).toHaveNoViolations();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment