We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d350e01 commit 6ca5f48Copy full SHA for 6ca5f48
app/test/components/Child.test.js
@@ -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