Skip to content

Commit 2bd6b2e

Browse files
committed
Revert "update test with store context"
This reverts commit fc2d9d3.
1 parent fc2d9d3 commit 2bd6b2e

1 file changed

Lines changed: 16 additions & 7 deletions

File tree

test/components/root.spec.jsx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,25 @@ import chaiEnzyme from 'chai-enzyme'
55
chai.use(chaiEnzyme())
66

77
import 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
}

0 commit comments

Comments
 (0)