diff options
| author | XhmikosR <[email protected]> | 2019-11-21 02:47:15 +0200 |
|---|---|---|
| committer | Nick Merwin <[email protected]> | 2019-11-20 16:47:15 -0800 |
| commit | eba01a29c69f28ffd7f50556492a43b5ba2486d7 (patch) | |
| tree | dd0773f3cdc01f87c99be6baf61fa9eb0e3bd7b0 /test/handleInput.js | |
| parent | cbc1bdf5ab1c48e5c6a59d229e4e601bd25f351d (diff) | |
| download | node-coveralls-eba01a29c69f28ffd7f50556492a43b5ba2486d7.tar.xz node-coveralls-eba01a29c69f28ffd7f50556492a43b5ba2486d7.zip | |
Fix tests on Windows. (#237)
Diffstat (limited to 'test/handleInput.js')
| -rw-r--r-- | test/handleInput.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/handleInput.js b/test/handleInput.js index d6f8098..bca7b16 100644 --- a/test/handleInput.js +++ b/test/handleInput.js @@ -1,3 +1,4 @@ +var sysPath = require('path'); var should = require('should'); var sinon = require('sinon-restore'); var index = require('../index'); @@ -12,7 +13,7 @@ describe("handleInput", function(){ sinon.stub(index, 'getOptions', function(cb){ return cb("some error", {}); }); - var path = __dirname + "/../fixtures/onefile.lcov"; + var path = sysPath.join(__dirname, "/../fixtures/onefile.lcov"); var input = fs.readFileSync(path, "utf8"); index.handleInput(input, function(err){ err.should.equal("some error"); @@ -26,7 +27,7 @@ describe("handleInput", function(){ sinon.stub(index, 'convertLcovToCoveralls', function(input, options, cb){ cb("some error"); }); - var path = __dirname + "/../fixtures/onefile.lcov"; + var path = sysPath.join(__dirname, "/../fixtures/onefile.lcov"); var input = fs.readFileSync(path, "utf8"); index.handleInput(input, function(err){ err.should.equal("some error"); @@ -40,7 +41,7 @@ describe("handleInput", function(){ sinon.stub(index, 'sendToCoveralls', function(postData, cb){ cb("some error"); }); - var path = __dirname + "/../fixtures/onefile.lcov"; + var path = sysPath.join(__dirname, "/../fixtures/onefile.lcov"); var input = fs.readFileSync(path, "utf8"); index.handleInput(input, function(err){ err.should.equal("some error"); @@ -54,7 +55,7 @@ describe("handleInput", function(){ sinon.stub(index, 'sendToCoveralls', function(postData, cb){ cb(null, {statusCode : 500}, "body"); }); - var path = __dirname + "/../fixtures/onefile.lcov"; + var path = sysPath.join(__dirname, "/../fixtures/onefile.lcov"); var input = fs.readFileSync(path, "utf8"); index.handleInput(input, function(err){ err.should.equal("Bad response: 500 body"); @@ -68,7 +69,7 @@ describe("handleInput", function(){ sinon.stub(index, 'sendToCoveralls', function(postData, cb){ cb(null, {statusCode : 200}, "body"); }); - var path = __dirname + "/../fixtures/onefile.lcov"; + var path = sysPath.join(__dirname, "/../fixtures/onefile.lcov"); var input = fs.readFileSync(path, "utf8"); index.handleInput(input, function(err, body){ (err === null).should.equal(true); |
