blob: e1a12912bd11de58fb09612f64a34c2d58d32ea5 (
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' }} />
</MemoryRouter>
);
let tree = component.toJSON();
expect(tree).toMatchSnapshot();
});
|