一段时间以来,我一直在使用酶来测试我的反应应用程序中的成分。在几周来第一次更新我的包之后,我开始从我的测试中得到一个错误。To find out more about this, see http://airbnb.io/enzyme/docs/installation/index.html
按照链接中的描述,继续安装'enzyme-adapter-react
我使用的酶与反应16通过卡玛,茉莉花和webpack。enzyme-adapter-react-16';
我已经将该文件添加到由Karma加载的文件列表中,并通过webpack构建它(因此我可以使用: import Adapter from 'enzyme-adapter-react-15'; To find out more about this, see http:/&