0
試圖單元測試與酶淺一Redux的形式FormSection
成分,並獲得以下錯誤
Error: FormSection must be inside a component decorated with reduxForm()
單元測試FormSection組件
什麼是避免這種錯誤的最佳選擇?
試圖單元測試與酶淺一Redux的形式FormSection
成分,並獲得以下錯誤
Error: FormSection must be inside a component decorated with reduxForm()
單元測試FormSection組件
什麼是避免這種錯誤的最佳選擇?
我能夠在上下文嘲諷reduxForm
來解決這個錯誤,如下所示:
shallow(<MyComponent {...props} />, { context:{ _reduxForm: {}}});