File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,16 +5,25 @@ import chaiEnzyme from 'chai-enzyme'
55chai . use ( chaiEnzyme ( ) )
66
77import Root from '../../src/components/root.jsx'
8- import makeStore from '../../src/store'
98
10- const store = makeStore ( )
11- let output
9+ // this fails with:
10+ // Invariant Violation: Could not find "store" in either the context or props of
11+ // "Connect(Counter)". Either wrap the root component in a <Provider>, or
12+ // explicitly pass "store" as a prop to "Connect(Counter)".
1213
13- exports [ '<Root />' ] = {
14+ const output = shallow ( < Root /> )
15+
16+ // FWIW, this also fails with the same error:
1417
15- before : ( ) => {
16- output = shallow ( < Root /> , { context : { store } } )
17- } ,
18+ // import { Provider } from 'react-redux'
19+ // import makeStore from '../../src/store'
20+ // const store = makeStore()
21+ // const output = shallow(
22+ // <Provider store={store} >
23+ // <Root />
24+ // </Provider>
25+ // )
1826
27+ exports [ '<Root />' ] = {
1928 'is a <div>' : ( ) => expect ( output ) . to . have . tagName ( 'div' ) ,
2029}
You can’t perform that action at this time.
0 commit comments