aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNick Merwin <[email protected]>2017-02-05 12:33:02 -0800
committerGitHub <[email protected]>2017-02-05 12:33:02 -0800
commit87b27f7185c848108caca967bc0ea503a3079cd9 (patch)
tree153e81ebf04bf079af326a00f00186b6d2e1c611 /test
parent3edbecb00d10d2a0049aa33ccf10cccf7b726cf2 (diff)
parentf94b6479d7357fe4602d30fb7cf08939300bac6d (diff)
downloadnode-coveralls-87b27f7185c848108caca967bc0ea503a3079cd9.tar.xz
node-coveralls-87b27f7185c848108caca967bc0ea503a3079cd9.zip
Merge pull request #142 from Hirse/feature/travis-pr
Get PR number from TRAVIS
Diffstat (limited to 'test')
-rw-r--r--test/convertLcovToCoveralls.js10
-rw-r--r--test/getOptions.js2
2 files changed, 7 insertions, 5 deletions
diff --git a/test/convertLcovToCoveralls.js b/test/convertLcovToCoveralls.js
index 25a0e97..31f40d9 100644
--- a/test/convertLcovToCoveralls.js
+++ b/test/convertLcovToCoveralls.js
@@ -8,7 +8,7 @@ logger = require('log-driver')({level : false});
describe("convertLcovToCoveralls", function(){
it ("should convert a simple lcov file", function(done){
- process.env.TRAVIS_JOB_ID = -1;
+ delete process.env.TRAVIS;
var lcovpath = __dirname + "/../fixtures/onefile.lcov";
var input = fs.readFileSync(lcovpath, "utf8");
var libpath = __dirname + "/../fixtures/lib";
@@ -23,7 +23,7 @@ describe("convertLcovToCoveralls", function(){
});
it ("should pass on all appropriate parameters from the environment", function(done){
- process.env.TRAVIS_JOB_ID = -1;
+ delete process.env.TRAVIS;
process.env.COVERALLS_GIT_COMMIT = "GIT_HASH";
process.env.COVERALLS_GIT_BRANCH = "master";
process.env.COVERALLS_SERVICE_NAME = "SERVICE_NAME";
@@ -47,7 +47,7 @@ describe("convertLcovToCoveralls", function(){
});
});
it ("should work with a relative path as well", function(done){
- process.env.TRAVIS_JOB_ID = -1;
+ delete process.env.TRAVIS;
var lcovpath = __dirname + "/../fixtures/onefile.lcov";
var input = fs.readFileSync(lcovpath, "utf8");
var libpath = "fixtures/lib";
@@ -60,7 +60,7 @@ describe("convertLcovToCoveralls", function(){
});
it ("should convert absolute input paths to relative", function(done){
- process.env.TRAVIS_JOB_ID = -1;
+ delete process.env.TRAVIS;
var lcovpath = __dirname + "/../fixtures/istanbul.lcov";
var input = fs.readFileSync(lcovpath, "utf8");
var libpath = "/Users/deepsweet/Dropbox/projects/svgo/lib";
@@ -89,7 +89,7 @@ describe("convertLcovToCoveralls", function(){
});
it ("should ignore files that do not exists", function(done){
- process.env.TRAVIS_JOB_ID = -1;
+ delete process.env.TRAVIS;
var lcovpath = __dirname + "/../fixtures/istanbul.lcov";
var input = fs.readFileSync(lcovpath, "utf8");
var libpath = "/Users/deepsweet/Dropbox/projects/svgo/lib";
diff --git a/test/getOptions.js b/test/getOptions.js
index 3124a83..51e4fa0 100644
--- a/test/getOptions.js
+++ b/test/getOptions.js
@@ -281,9 +281,11 @@ var testServicePullRequest = function(sut, done){
var testTravisCi = function(sut, done){
process.env.TRAVIS = "TRUE";
process.env.TRAVIS_JOB_ID = "1234";
+ process.env.TRAVIS_PULL_REQUEST = "123";
sut(function(err, options){
options.service_name.should.equal("travis-ci");
options.service_job_id.should.equal("1234");
+ options.service_pull_request.should.equal("123");
done();
});
};