blob: e7221871a366a8eec0c3a5f37b8201618b53be1b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import React from 'react';
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();
});
|