Skip to content

Commit 6ca5f48

Browse files
committed
Adds test suite
1 parent d350e01 commit 6ca5f48

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

app/test/components/Child.test.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/* global expect */
2+
import React from 'react';
3+
import ReactDOM from 'react-dom';
4+
import Child from '../../js/components/Child.js';
5+
import { shallow, configure } from 'enzyme';
6+
import Adapter from 'enzyme-adapter-react-16';
7+
8+
configure({ adapter: new Adapter() });
9+
10+
test('Renders without crashing', () => {
11+
const div = document.createElement('div');
12+
ReactDOM.render(<Child name="child" />, div);
13+
});
14+
15+
it('Containts specific test', () => {
16+
const wrapper = shallow(<Child name="child" />);
17+
expect(wrapper.text()).toBe("and this is the child.");
18+
});

0 commit comments

Comments
 (0)