-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Description
I take a clone and run the test cases . All test cases and pass except for App.test.js.
its throw an error
● App Component › exampleMethod_returnsAValue Method should return value as expected
Invariant Violation: ReactShallowRenderer render(): Shallow rendering works only with custom components, but the provided element type was `object`.
```
const setUp = (initialState={}) => {
const store = testStore(initialState);
const wrapper = shallow().childAt(0).dive();
^
return wrapper;
};
at invariant (node_modules/react-test-renderer/cjs/react-test-renderer-shallow.development.js:54:15)
at ReactShallowRenderer.render (node_modules/react-test-renderer/cjs/react-test-renderer-shallow.development.js:382:78)
at node_modules/enzyme-adapter-react-16/build/ReactSixteenAdapter.js:480:35
at withSetStateAllowed (node_modules/enzyme-adapter-utils/build/Utils.js:137:16)
at Object.render (node_modules/enzyme-adapter-react-16/build/ReactSixteenAdapter.js:479:68)
at new ShallowWrapper (node_modules/enzyme/build/ShallowWrapper.js:206:22)
at shallow (node_modules/enzyme/build/shallow.js:21:10)
at setUp (src/App.test.js:8:21)
at Object.setUp (src/App.test.js:28:19)
Metadata
Metadata
Assignees
Labels
No labels