diff options
| author | Nick Merwin <[email protected]> | 2019-08-06 14:27:37 -0700 |
|---|---|---|
| committer | Nick Merwin <[email protected]> | 2019-08-06 14:27:37 -0700 |
| commit | d3045b4cb3a859de9e4e440f99933c4dd0a568a0 (patch) | |
| tree | 0b854db69bc276df3508388249f1eb2624562e71 /test | |
| parent | 55fc4d882b030ff18d64693e0db6b51cad2b527b (diff) | |
| download | node-coveralls-d3045b4cb3a859de9e4e440f99933c4dd0a568a0.tar.xz node-coveralls-d3045b4cb3a859de9e4e440f99933c4dd0a568a0.zip | |
handleInput callback include bodyv3.0.6
* version bump
Diffstat (limited to 'test')
| -rw-r--r-- | test/handleInput.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/handleInput.js b/test/handleInput.js index dc88902..d6f8098 100644 --- a/test/handleInput.js +++ b/test/handleInput.js @@ -10,7 +10,7 @@ describe("handleInput", function(){ }); it ("returns an error when there's an error getting options", function(done){ sinon.stub(index, 'getOptions', function(cb){ - return cb("some error", {}); + return cb("some error", {}); }); var path = __dirname + "/../fixtures/onefile.lcov"; var input = fs.readFileSync(path, "utf8"); @@ -21,7 +21,7 @@ describe("handleInput", function(){ }); it ("returns an error when there's an error converting", function(done){ sinon.stub(index, 'getOptions', function(cb){ - return cb(null, {}); + return cb(null, {}); }); sinon.stub(index, 'convertLcovToCoveralls', function(input, options, cb){ cb("some error"); @@ -35,7 +35,7 @@ describe("handleInput", function(){ }); it ("returns an error when there's an error sending", function(done){ sinon.stub(index, 'getOptions', function(cb){ - return cb(null, {}); + return cb(null, {}); }); sinon.stub(index, 'sendToCoveralls', function(postData, cb){ cb("some error"); @@ -49,7 +49,7 @@ describe("handleInput", function(){ }); it ("returns an error when there's a bad status code", function(done){ sinon.stub(index, 'getOptions', function(cb){ - return cb(null, {}); + return cb(null, {}); }); sinon.stub(index, 'sendToCoveralls', function(postData, cb){ cb(null, {statusCode : 500}, "body"); @@ -63,15 +63,16 @@ describe("handleInput", function(){ }); it ("completes successfully when there are no errors", function(done){ sinon.stub(index, 'getOptions', function(cb){ - return cb(null, {}); + return cb(null, {}); }); sinon.stub(index, 'sendToCoveralls', function(postData, cb){ cb(null, {statusCode : 200}, "body"); }); var path = __dirname + "/../fixtures/onefile.lcov"; var input = fs.readFileSync(path, "utf8"); - index.handleInput(input, function(err){ + index.handleInput(input, function(err, body){ (err === null).should.equal(true); + body.should.equal('body'); done(); }); }); |
