NODE_ENV=test YOURPACKAGE_COVERAGE=1 mocha --compilers coffee:coffee-script/register --require blanket --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
在我当地工作正常。
> mocha --compilers coffee:coffee-script/register --require blanket --reporter mocha-lcov-reporter | ./node_modules/coveralls/bin/coveralls.js
[error] "2015-04-26T12:41:57.904Z" 'error from lcovParse: ' 'Failed to parse string'
[error] "2015-04-26T12:41:57.906Z" 'input: ' ''
[error] "2015-04-26T12:41:57.906Z" 'error from convertLcovToCoveralls'
答案 0 :(得分:0)
这是因为某些工具仅适用于最新版本的节点。我有样本问题,直到我更改.travis.yaml
中的节点版本:
node_js:
- "6"
答案 1 :(得分:0)
您需要在执行之前告诉Travis CI安装最新的节点:
language: node_js
node_js:
- "node"