blob: ac33abe9818bb7fb9c5d42cc8bd5d35c594d8dbe (
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();
});
|