yarn test: all tests passed but returned “error Command failed with exit code 1”

限于喜欢 提交于 2020-01-14 13:14:10

问题


I used to use npm but recently switched to yarn. When I run yarn test it shows all tests passed but below says error Command failed with exit code 1 with no other information on what could have caused this error

node version: 6.3.1

yarn version: 0.16.3

potential cause 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)


回答1:


Answer:

the error code was due to line coverage being below the value that I defined (90%). It already told me line coverage 86.8% is below user defined value of 90% so I thought it unlikely that yarn would "double report" that error.



来源:https://stackoverflow.com/questions/40980837/yarn-test-all-tests-passed-but-returned-error-command-failed-with-exit-code-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!