当包含来自shallow
的enzyme
时,我会收到这个警告。
Warning: ReactTestUtils has been moved to react-dom/test-utils. Update references to remove this warning.
它似乎没有打破测试,它只是令人恼火。
我找到了same issue here,但解决方案建议没有为我解决这个问题。按照我的package.json安装了下面的依赖项
"react": "15.4.2", "react-dom": "15.4.2", "react-addons-test-utils": "^15.4.2", "enzyme": "^2.8.2"
当我评论import { mount, shallow } from 'enzyme';
时,我没有看到这个警告。有谁知道怎么解决这个问题吗?
发布于 2017-05-21 23:59:49
通过将react-addons-test-utils
的版本设置为15.4.2
解决问题
https://stackoverflow.com/questions/44102857
复制相似问题