blob: 0b67236530e92a703ff131764f0491c1453d8fda (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import React from 'react';
import LoginButton from '../LoginButton';
import renderer from 'react-test-renderer';
test('Login button and form are renders correctly', () => {
const button = renderer.create(
<LoginButton title="Log in" onAuth={() => {}} />
);
let link = button.toJSON();
expect(link).toMatchSnapshot();
button.root.instance.toggleModal();
let modal = button.toJSON();
expect(modal).toMatchSnapshot();
});
|