biojs / slush-biojs

DEPRECATED - please use https://github.com/biojs/generator-biojs-webcomponents
https://github.com/biojs/generator-biojs-webcomponents
7 stars 3 forks source link

npm test fails #8

Open Endle opened 10 years ago

Endle commented 10 years ago

$ slush biojs Then, ran $npm test, and it fails:

[11:25:36] Using gulpfile ~/src/biojs/gulpfile.js
[11:25:36] Starting 'coveralls'...
[error] "2014-10-05T03:25:36.094Z" 'error from lcovParse: ' 'Failed to parse string'
[error] "2014-10-05T03:25:36.094Z" 'input: ' ''
[11:25:36] 'coveralls' errored after 39 ms
[11:25:36] Error in plugin 'gulp-coveralls'
Failed to parse string
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0

And I've written a dirty hack for that:

diff --git a/convertLcovToCoveralls.js b/convertLcovToCoveralls.js.new
index 3f604e1..5d56601 100644
--- a/convertLcovToCoveralls.js
+++ b/convertLcovToCoveralls.js.new
@@ -24,6 +24,10 @@ var convertLcovFileObject = function(file, filepath){
 };

 var convertLcovToCoveralls = function(input, options, cb){
+    console.log('Dirty hack to avoid test fails');
+}
+/*
+var convertLcovToCoveralls = function(input, options, cb){
   var filepath = options.filepath || '';
   logger.debug("in: ", filepath);
   filepath = path.resolve(process.cwd(), filepath);
@@ -57,6 +61,7 @@ var convertLcovToCoveralls = function(input, options, cb){
     return cb(null, postJson);
   });
 };
+*/

 module.exports = convertLcovToCoveralls;

Maybe this is related to Dependency of glup failed #7 ?

wilzbach commented 10 years ago

@Endle thanks for letting us know. You receive this error because the generated LCOV file is empty (2). Anyhow even if it would be there (3) would be blocking you.

@emepyc I temporarily disabled the coveralls task. (=CLI answer for coverage is always false).

The main reasons were that:

(1) the command is failing for an empty test folder (see above) (2) the LCOV file (produced by mocha --reporter mocha-lcov-reporter --require blanket) is empty for the blank setup (it is failing because the tests are split up in test/dom (tested with PhantomJS) and test/unit - mocha --reporter mocha-lcov-reporter --require "blanket" test/unit would work) (3) coveralls needs registration in the web (otherwise it returns Couldn't find a repository matching this job) (4) I would prefer if we generate the lcov in entirely in JS code (gulpfile.js).

I would be glad to re-enable the coveralls task after we resolved those points :)

A package maybe worth looking could be gulp-coverage.