UNPKG

@muvehealth/fixins

Version:

Component library for Muvehealth

49 lines (43 loc) 1.45 kB
/* eslint-disable function-paren-newline, comma-dangle */ import React from 'react' import renderWithTheme from '../../testHelper' import Avatar from '../Avatar' describe('Avatar', () => { it('renders a Primary Avatar', () => { const tree = renderWithTheme( <Avatar size={48} initials="JS" /> ) expect(tree).toMatchSnapshot() }) it('renders a Secondary Avatar', () => { const tree = renderWithTheme( <Avatar secondary size={48} initials="JS" /> ) expect(tree).toMatchSnapshot() }) it('renders a Photo Avatar', () => { const tree = renderWithTheme( <Avatar size={48} fullName="Jerry Seinfeld" url="https://images.unsplash.com/photo-1503664974666-c4b8f669f3ae?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=e1a277c929d2a8ccf0982e44c33fc732&auto=format&fit=crop&w=2900&q=80" /> ) expect(tree).toMatchSnapshot() }) it('renders a Photo Avatar with no size', () => { const tree = renderWithTheme( <Avatar fullName="Jerry Seinfeld" url="https://images.unsplash.com/photo-1503664974666-c4b8f669f3ae?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=e1a277c929d2a8ccf0982e44c33fc732&auto=format&fit=crop&w=2900&q=80" /> ) expect(tree).toMatchSnapshot() }) it('renders a Primary Avatar with no size', () => { const tree = renderWithTheme( <Avatar initials="JS" /> ) expect(tree).toMatchSnapshot() }) })