docbrown/app/javascript/articles/__tests__/ArticleLoading.test.jsx
Rajat Talesra cce51588db
Replace uses of toBeDefined with toExist (#19862)
* Replaced toBeDefined with toExist

* Revert db changes
2023-08-04 19:58:58 +05:30

19 lines
540 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...')).toExist();
});
});