1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-28 04:40:05 +02:00
copilot/packages/cp-frontend/test/unit/components/manifest/name.js
2017-09-07 16:02:29 +01:00

35 lines
819 B
JavaScript

/**
* @jest-environment jsdom
*/
import React from 'react';
import renderer from 'react-test-renderer';
import 'jest-styled-components';
import { Store } from '../../mocks';
import { reduxForm } from 'redux-form';
import { Name } from '@components/manifest';
const TestNameForm = reduxForm({ form: 'testNameForm' })(Name);
it('renders <Name /> without throwing', () => {
const tree = renderer
.create(
<Store>
<TestNameForm handleSubmit={() => {}} onCancel={() => {}} dirty />
</Store>
)
.toJSON();
expect(tree).toMatchSnapshot();
});
it('renders <Name /> without throwing', () => {
const tree = renderer
.create(
<Store>
<TestNameForm handleSubmit={() => {}} onCancel={() => {}} />
</Store>
)
.toJSON();
expect(tree).toMatchSnapshot();
});