Skip to content

Commit d182f8b

Browse files
committed
add comments to failing test case
1 parent cdbe9f9 commit d182f8b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

test/components/root.spec.jsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,24 @@ chai.use(chaiEnzyme())
66

77
import Root from '../../src/components/root.jsx'
88

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)".
13+
914
const output = shallow(<Root />)
1015

16+
// FWIW, this also fails with the same error:
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+
// )
26+
1127
exports['<Root />'] = {
1228
'is a <div>': () => expect(output).to.have.tagName('div'),
1329
}

0 commit comments

Comments
 (0)