metadata-based-explorer1
Version:
Box UI Elements
14 lines (10 loc) • 494 B
JavaScript
import React from 'react';
import AvatarImage from '../AvatarImage';
const testDataURI = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
describe('components/avatar/AvatarImage', () => {
test('should render an img element', () => {
const wrapper = shallow(<AvatarImage className="test" url={testDataURI} />);
expect(wrapper.is('img.avatar-image.test')).toBeTruthy();
expect(wrapper.prop('src')).toEqual(testDataURI);
});
});