nexxtway/react-rainbow

View on GitHub
src/components/StrongPasswordInput/__test__/strongPasswordInput.a11y.spec.js

Summary

Maintainability
A
2 hrs
Test Coverage
import React from 'react';
import ReactDOMServer from 'react-dom/server';
import axe from '../../../../axe';
import StrongPasswordInput from '..';

describe('<StrongPasswordInput />', () => {
    it('should be accessible when label is passed', async () => {
        expect.assertions(1);
        const html = ReactDOMServer.renderToString(<StrongPasswordInput label="Input Label" />);
        const results = await axe(html);
        expect(results).toHaveNoViolations();
    });
});