nexxtway/react-rainbow

View on GitHub
src/components/WeekDayPicker/__test__/weekDayPicker.a11y.spec.js

Summary

Maintainability
A
3 hrs
Test Coverage
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import axe from '../../../../axe';
import WeekDayPicker from '../index';

describe('<WeekDayPicker />', () => {
    it('should be accessible', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(
            <WeekDayPicker label="Accesibility test on WeekDayPicker" value="monday" />,
        );
        const results = await axe(html);
        expect(results).toHaveNoViolations();
    });
});