[Pkg-javascript-commits] [node-coveralls] 297/332: merge, version bump

Bastien Roucariès rouca at moszumanska.debian.org
Thu Nov 9 13:54:13 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-coveralls.

commit d571dac62547f487b3862aca8bf367e95957d904
Merge: 8dfcfd6 1575050
Author: Nick Merwin <n at mer.io>
Date:   Sun Mar 5 11:12:45 2017 -0800

    merge, version bump

 lib/convertLcovToCoveralls.js  | 16 ++++++++++++++--
 package.json                   |  2 +-
 test/convertLcovToCoveralls.js | 29 +++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 3 deletions(-)

diff --cc test/convertLcovToCoveralls.js
index 31f40d9,9a7789c..eb67305
--- a/test/convertLcovToCoveralls.js
+++ b/test/convertLcovToCoveralls.js
@@@ -88,8 -88,37 +88,37 @@@ describe("convertLcovToCoveralls", func
      });
    });
  
+   it ("should handle branch coverage data", function(done){
+     process.env.TRAVIS_JOB_ID = -1;
+     var lcovpath = __dirname + "/../fixtures/istanbul.lcov";
+     var input = fs.readFileSync(lcovpath, "utf8");
+     var libpath = "/Users/deepsweet/Dropbox/projects/svgo/lib";
+     var sourcepath = path.resolve(libpath, "svgo/config.js");
+ 
+     var originalReadFileSync = fs.readFileSync;
+     fs.readFileSync = function(filepath) {
+       if (filepath === sourcepath) {
+         return '';
+       }
+ 
+       return originalReadFileSync.apply(fs, arguments);
+     };
+ 
+     var originalExistsSync = fs.existsSync;
+     fs.existsSync = function () { return true; };
+ 
+     convertLcovToCoveralls(input, {filepath: libpath}, function(err, output){
+       fs.readFileSync = originalReadFileSync;
+       fs.existsSync = originalExistsSync;
+       
+       should.not.exist(err);
+       output.source_files[0].branches.slice(0,8).should.eql([18,1,0,85,18,1,1,2]);
+       done();
+     });
+   });
+ 
    it ("should ignore files that do not exists", function(done){
 -    process.env.TRAVIS_JOB_ID = -1;
 +    delete process.env.TRAVIS;
      var lcovpath = __dirname + "/../fixtures/istanbul.lcov";
      var input = fs.readFileSync(lcovpath, "utf8");
      var libpath = "/Users/deepsweet/Dropbox/projects/svgo/lib";

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-coveralls.git



More information about the Pkg-javascript-commits mailing list