我以前使用 npm 但最近改用yarn。当我跑步时yarn test
它显示所有测试都已通过,但下面说error Command failed with exit code 1
没有其他信息说明可能导致此错误的原因
节点版本:6.3.1
纱线版本:0.16.3
潜在原因console.error node_modules/core-js/modules/es6.promise.js:117
Unhandled promise rejection Error: Actions may not be an undefined.
at dispatch (/node_modules/redux-mock-store/lib/index.js:35:19)
at /node_modules/redux-thunk/lib/index.js:14:16
at dispatch (/node_modules/redux/lib/applyMiddleware.js:45:18)
at /src/actions/ontologies.js:159:7
at run (/node_modules/core-js/modules/es6.promise.js:87:22)
at /node_modules/core-js/modules/es6.promise.js:100:28
at flush (/node_modules/core-js/modules/_microtask.js:18:9)
at process._tickCallback (internal/process/next_tick.js:103:7)
就我而言,这是由snapshots obsolete
一些测试代码更改后。所以解决办法就是删除里面的那些测试数据__snapshots__
folder
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)