src/components/Spinner/__test__/spinner.a11y.spec.js
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import axe from '../../../../axe';
import Spinner from '..';
describe('<Spinner/>', () => {
it('should be accessible', async () => {
expect.assertions(1);
const html = ReactDOMServer.renderToString(<Spinner />);
const results = await axe(html);
expect(results).toHaveNoViolations();
});
});