nexxtway/react-rainbow

View on GitHub
src/components/Avatar/__test__/avatar.spec.js

Summary

Maintainability
A
2 hrs
Test Coverage
import React from 'react';
import { mount } from 'enzyme';
import Avatar from '../index';

describe('<Avatar/>', () => {
    it('should pass assistiveText to the prop text of AssistiveText component', () => {
        const component = mount(<Avatar initials="JD" assistiveText="for screen readers" />);
        expect(component.find('AssistiveText').prop('text')).toBe('for screen readers');
    });
});