You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
After unboxing, then compiling and migrating my contracts, Jest tests fail on npm run test
node v7.1.0
truffle v3.4.11
solidiy v0.4.15
FAIL src/App.test.js
● renders without crashing
Invariant Violation: Could not find "store" in either the context or props of "Connect(HiddenOnlyAuth(Component))". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(HiddenOnlyAuth(Component))".
at invariant (node_modules/invariant/invariant.js:42:15)
at new Connect (node_modules/react-redux/lib/components/connectAdvanced.js:134:33)
at node_modules/react-dom/lib/ReactCompositeComponent.js:292:18
at measureLifeCyclePerf (node_modules/react-dom/lib/ReactCompositeComponent.js:73:12)
at ReactCompositeComponentWrapper._constructComponentWithoutOwner (node_modules/react-dom/lib/ReactCompositeComponent.js:291:16)
at ReactCompositeComponentWrapper._constructComponent (node_modules/react-dom/lib/ReactCompositeComponent.js:282:19)
at ReactCompositeComponentWrapper.mountComponent (node_modules/react-dom/lib/ReactCompositeComponent.js:185:21)
at Object.mountComponent (node_modules/react-dom/lib/ReactReconciler.js:43:35)
at ReactDOMComponent.mountChildren (node_modules/react-dom/lib/ReactMultiChild.js:234:44)
at ReactDOMComponent._createInitialChildren (node_modules/react-dom/lib/ReactDOMComponent.js:701:32)
at ReactDOMComponent.mountComponent (node_modules/react-dom/lib/ReactDOMComponent.js:520:12)
at Object.mountComponent (node_modules/react-dom/lib/ReactReconciler.js:43:35)
at ReactDOMComponent.mountChildren (node_modules/react-dom/lib/ReactMultiChild.js:234:44)
at ReactDOMComponent._createInitialChildren (node_modules/react-dom/lib/ReactDOMComponent.js:701:32)
at ReactDOMComponent.mountComponent (node_modules/react-dom/lib/ReactDOMComponent.js:520:12)
at Object.mountComponent (node_modules/react-dom/lib/ReactReconciler.js:43:35)
at ReactDOMComponent.mountChildren (node_modules/react-dom/lib/ReactMultiChild.js:234:44)
at ReactDOMComponent._createInitialChildren (node_modules/react-dom/lib/ReactDOMComponent.js:701:32)
at ReactDOMComponent.mountComponent (node_modules/react-dom/lib/ReactDOMComponent.js:520:12)
at Object.mountComponent (node_modules/react-dom/lib/ReactReconciler.js:43:35)
at ReactCompositeComponentWrapper.performInitialMount (node_modules/react-dom/lib/ReactCompositeComponent.js:368:34)
at ReactCompositeComponentWrapper.mountComponent (node_modules/react-dom/lib/ReactCompositeComponent.js:255:21)
at Object.mountComponent (node_modules/react-dom/lib/ReactReconciler.js:43:35)
at ReactCompositeComponentWrapper.performInitialMount (node_modules/react-dom/lib/ReactCompositeComponent.js:368:34)
at ReactCompositeComponentWrapper.mountComponent (node_modules/react-dom/lib/ReactCompositeComponent.js:255:21)
at Object.mountComponent (node_modules/react-dom/lib/ReactReconciler.js:43:35)
at mountComponentIntoNode (node_modules/react-dom/lib/ReactMount.js:102:32)
at ReactReconcileTransaction.perform (node_modules/react-dom/lib/Transaction.js:141:20)
at batchedMountComponentIntoNode (node_modules/react-dom/lib/ReactMount.js:124:15)
at ReactDefaultBatchingStrategyTransaction.perform (node_modules/react-dom/lib/Transaction.js:141:20)
at Object.batchedUpdates (node_modules/react-dom/lib/ReactDefaultBatchingStrategy.js:60:26)
at Object.batchedUpdates (node_modules/react-dom/lib/ReactUpdates.js:95:27)
at Object._renderNewRootComponent (node_modules/react-dom/lib/ReactMount.js:317:18)
at Object._renderSubtreeIntoContainer (node_modules/react-dom/lib/ReactMount.js:399:32)
at Object.render (node_modules/react-dom/lib/ReactMount.js:420:23)
at Object.<anonymous>.it (src/App.test.js:7:48)
FAIL scripts/test.js
● Test suite failed to run
SyntaxError: Identifier 'jest' has already been declared
at Runtime._execModule (node_modules/jest-runtime/build/index.js:442:13)
Test Suites: 2 failed, 2 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 1.729s
Ran all test suites.
Watch Usage
› Press p to filter by a filename regex pattern.
› Press q to quit watch mode.
› Press Enter to trigger a test run.
The text was updated successfully, but these errors were encountered:
Invariant Violation: Could not find "store" in either the context or props of "Connect(HiddenOnlyAuth(Component))". Either wrap the root component in a , or explicitly pass "store" as a prop to "Connect(HiddenOnlyAuth(Component))".
Imported some modules and modified inside ReactDOM.render
...
import { Provider } from 'react-redux'
import store from './store'
...
it('renders without crashing', () => {
const div = document.createElement('div')
ReactDOM.render((
<Provider store={store}>
<App />
</Provider>
),
div
)
})
Needed to declare 'store' for the wrapper file.
sampsojp
added a commit
to sampsojp/learn-react-uport
that referenced
this issue
Jul 22, 2018
After unboxing, then compiling and migrating my contracts, Jest tests fail on
npm run test
node v7.1.0
truffle v3.4.11
solidiy v0.4.15
The text was updated successfully, but these errors were encountered: