Can't seem to find the root cause of this random failure in emzyme + jest test.
Any helps would be very appreciated.
TypeError: Cannot read property 'isReactComponent' of undefined
at shouldConstruct (node_modules/react-test-renderer/lib/shallow/ReactCompositeCompo
n
ent.js:57:55)
at ShallowComponentWrapper.mountComponent (node_modules/react-test-renderer/lib/shallow/ReactCompositeComponent.js:186:23)
at Object.mountComponent (node_modules/react-test-renderer/lib/shallow/ReactReconciler.js:45:35)
at ReactShallowRenderer._render (node_modules/react-test-renderer/lib/shallow/ReactShallowRenderer.js:138:23)
at _batchedRender (node_modules/react-test-renderer/lib/shallow/ReactShallowRenderer.js:85:12)
at Object.batchedUpdates (node_modules/react-test-renderer/lib/shallow/ReactDefaultBatchingStrategy.js:60:14)
at Object.batchedUpdates (node_modules/react-test-renderer/lib/shallow/ReactUpdates.js:97:27)
at ReactShallowRenderer.render (node_modules/react-test-renderer/lib/shallow/ReactShallowRenderer.js:112:18)
at ReactShallowRenderer.render (node_modules/enzyme/build/react-compat.js:171:37)
at node_modules/enzyme/build/ShallowWrapper.js:128:26
at ReactDefaultBatchingStrategyTransaction.perform (node_modules/react-test-renderer/lib/shallow/Transaction.js:143:20)
at Object.batchedUpdates (node_modules/react-test-renderer/lib/shallow/ReactDefaultBatchingStrategy.js:62:26)
at Object.batchedUpdates (node_modules/react-test-renderer/lib/shallow/ReactUpdates.js:97:27)
at ReactShallowRenderer.unstable_batchedUpdates (node_modules/react-test-renderer/lib/shallow/ReactShallowRenderer.js:130:25)
at performBatchedUpdates (node_modules/enzyme/build/ShallowWrapper.js:103:21)
at node_modules/enzyme/build/ShallowWrapper.js:127:9
at withSetStateAllowed (node_modules/enzyme/build/Utils.js:284:3)
at new ShallowWrapper (node_modules/enzyme/build/ShallowWrapper.js:126:38)
at ShallowWrapper.wrap (node_modules/enzyme/build/ShallowWrapper.js:1546:16)
at ShallowWrapper. (node_modules/enzyme/build/ShallowWrapper.js:1614:26)
at ShallowWrapper.single (node_modules/enzyme/build/ShallowWrapper.js:1518:25)
at ShallowWrapper.dive (node_modules/enzyme/build/ShallowWrapper.js:1607:21)
at process._tickCallback (internal/process/next_tick.js:109:7)
Can't seem to find the root cause of this random failure in emzyme + jest test.
Any helps would be very appreciated.