为context
包裹的浅层渲染组件创建redux-form
和任何必要数据的正确方法是什么?
这里有几个例子:
https://github.com/styled-components/jest-styled-components#theming https://github.com/yahoo/react-intl/wiki/Testing-with-React-Intl#enzyme
理想情况下,shallowUntilTarget
方法应该易于使用:
https://github.com/mozilla/addons-frontend/blob/58d1315409f1ad6dc9b979440794df44c1128455/tests/unit/helpers.js#L276 https://hacks.mozilla.org/2018/04/testing-strategies-for-react-and-redux/