纱线测试:所有测试均通过但返回“错误命令失败,退出代码为 1"; [英] yarn test: all tests passed but returned "error Command failed with exit code 1"

查看:77
本文介绍了纱线测试:所有测试均通过但返回“错误命令失败,退出代码为 1";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经使用 npm,但最近改用了 yarn.当我运行 yarn test 它显示所有测试通过但下面说 error Command failed with exit code 1 没有其他可能导致此错误的信息

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

节点版本:6.3.1

纱线版本​​:0.16.3

yarn version: 0.16.3

潜在原因console.error node_modules/core-js/modules/es6.promise.js:117未处理的承诺拒绝错误:操作可能不是未定义的.在调度 (/node_modules/redux-mock-store/lib/index.js:35:19)在/node_modules/redux-thunk/lib/index.js:14:16在调度 (/node_modules/redux/lib/applyMiddleware.js:45:18)在/src/actions/ontologies.js:159:7运行时 (/node_modules/core-js/modules/es6.promise.js:87:22)在/node_modules/core-js/modules/es6.promise.js:100:28在刷新 (/node_modules/core-js/modules/_microtask.js:18:9)在 process._tickCallback (internal/process/next_tick.js:103:7)

推荐答案

答案:

错误代码是由于线路覆盖率低于我定义的值 (90%).它已经告诉我行覆盖率 86.8% 低于用户定义的 90% 值,所以我认为纱线不太可能重复报告"该错误.

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.

这篇关于纱线测试:所有测试均通过但返回“错误命令失败,退出代码为 1";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆