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 | |
| parent | 55fc4d882b030ff18d64693e0db6b51cad2b527b (diff) | |
| download | node-coveralls-3.0.6.tar.xz node-coveralls-3.0.6.zip | |
handleInput callback include bodyv3.0.6
* version bump
| -rw-r--r-- | lib/handleInput.js | 2 | ||||
| -rw-r--r-- | package.json | 2 | ||||
| -rw-r--r-- | test/handleInput.js | 13 |
3 files changed, 9 insertions, 8 deletions
diff --git a/lib/handleInput.js b/lib/handleInput.js index d9a4126..326671e 100644 --- a/lib/handleInput.js +++ b/lib/handleInput.js @@ -30,7 +30,7 @@ function handleInput(input, cb, userOptions) { } logger.debug(response.statusCode); logger.debug(body); - cb(null); + cb(null, body); }); }); }, userOptions); diff --git a/package.json b/package.json index 9a4e71b..6c5ccc7 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "coverage", "coveralls" ], - "version": "3.0.5", + "version": "3.0.6", "bugs": { "url": "https://github.com/nickmerwin/node-coveralls/issues" }, 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(); }); }); |
