aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorcainus <[email protected]>2013-03-28 11:33:45 -0700
committercainus <[email protected]>2013-03-28 11:33:45 -0700
commit5b2ed846c142ccdcd28b309a6b8bd76b2d0b96be (patch)
tree11a905882ddeea9ce8f086d3296735c0a639c776 /test
parent9fe2ff033c741dde446f9cd0844718a9dfd6d924 (diff)
downloadnode-coveralls-5b2ed846c142ccdcd28b309a6b8bd76b2d0b96be.tar.xz
node-coveralls-5b2ed846c142ccdcd28b309a6b8bd76b2d0b96be.zip
using lcov-parse lib. version bump 2.0.5
Diffstat (limited to 'test')
-rw-r--r--test/convertLcovToCoveralls.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/test/convertLcovToCoveralls.js b/test/convertLcovToCoveralls.js
index bbe5f09..6cf9521 100644
--- a/test/convertLcovToCoveralls.js
+++ b/test/convertLcovToCoveralls.js
@@ -8,11 +8,13 @@ describe("convertLcovToCoveralls", function(){
var path = __dirname + "/../fixtures/onefile.lcov";
var input = fs.readFileSync(path, "utf8");
var libpath = __dirname + "/../fixtures/lib";
- var output = convertLcovToCoveralls(input, libpath);
- output.source_files[0].name.should.equal("index.js");
- output.source_files[0].source.split("\n").length.should.equal(225);
- output.source_files[0].coverage[54].should.equal(0);
- output.source_files[0].coverage[60].should.equal(0);
+ convertLcovToCoveralls(input, libpath, function(err, output){
+ should.not.exist(err);
+ output.source_files[0].name.should.equal("index.js");
+ output.source_files[0].source.split("\n").length.should.equal(225);
+ output.source_files[0].coverage[54].should.equal(0);
+ output.source_files[0].coverage[60].should.equal(0);
+ });
});
it ("should work with a relative path as well", function(){
@@ -20,8 +22,10 @@ describe("convertLcovToCoveralls", function(){
var path = __dirname + "/../fixtures/onefile.lcov";
var input = fs.readFileSync(path, "utf8");
var libpath = "fixtures/lib";
- var output = convertLcovToCoveralls(input, libpath);
- output.source_files[0].name.should.equal("index.js");
- output.source_files[0].source.split("\n").length.should.equal(225);
+ convertLcovToCoveralls(input, libpath, function(err, output){
+ should.not.exist(err);
+ output.source_files[0].name.should.equal("index.js");
+ output.source_files[0].source.split("\n").length.should.equal(225);
+ });
});
});