diff options
| -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(); }); }); |
