【发布时间】:2021-02-15 20:19:26
【问题描述】:
我有一个 React 应用程序,我想开始使用 Enzyme 编写单元测试。 Enzyme 的 documentation 讨论了 React 最多 16 的版本。
在src/setupTests.js我目前有
import Enzyme from 'enzyme';
import Adapter from 'enzyme-adapter-react-16';
Enzyme.configure({ adapter: new Adapter() });
但我的应用使用 React 版本 17.0.1。 React 17 有哪些酶适配器?
【问题讨论】:
标签: reactjs unit-testing enzyme