在测试React components时,有一个常见的问题,该组件连接到酶中的Redux。Invariant Violation: Could not find "store" in either the context or props of "Connect(YourComponent)
通过两次导出测试中的组件我正在测试一个连接的组件,我正在使用
我一直在寻找一种我知道有效的解决方案,但是语法让我很不爽。下面是一个场景:export default connect(mapStateToProps, mapDispatchToProps)(componentToExport);Could not find "store" in either the context or props of "Connect(co