docbrown/app/javascript/articles/__tests__/ArticleLoading.test.jsx
2020-06-25 09:07:34 -04:00

19 lines
544 B
JavaScript

import { h } from 'preact';
import { render } from '@testing-library/preact';
import { axe } from 'jest-axe';
import { LoadingArticle } from '..';
describe('<LoadingArticle />', () => {
it('should have no a11y violations', async () => {
const { container } = render(<LoadingArticle />);
const results = await axe(container);
expect(results).toHaveNoViolations();
});
it('should render', () => {
const { queryByTitle } = render(<LoadingArticle />);
expect(queryByTitle('Loading posts...')).toBeDefined();
});
});