aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/__tests__/Avatar.test.js
blob: f454f6c77cb093df95c848c0a95a532485c5878b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { MemoryRouter } from 'react-router-dom';

import Avatar from '../Avatar';
import renderer from 'react-test-renderer';

test('Avatar renders correctly', () => {
    const component = renderer.create(
        <MemoryRouter>
            <Avatar user={{ uid: 1, uname: 'ugnich', avatar: 'https://juick.com/i/a/1-deadbeef.png' }} />
        </MemoryRouter>
    );
    let tree = component.toJSON();
    expect(tree).toMatchSnapshot();
});