diff options
Diffstat (limited to 'test/getOptions.js')
| -rw-r--r-- | test/getOptions.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/test/getOptions.js b/test/getOptions.js index e79abc7..cc0c5d5 100644 --- a/test/getOptions.js +++ b/test/getOptions.js @@ -149,6 +149,9 @@ describe("getOptions", function(){ it ("should set service_name and service_job_id if it's running on Gitlab", function(done){ testGitlab(getOptions, done); }); + it ("should set service_name and service_job_id if it's running on AppVeyor", function(done){ + testAppVeyor(getOptions, done); + }); it ("should set service_name and service_job_id if it's running via Surf", function(done){ testSurf(getOptions, done); }); @@ -455,6 +458,30 @@ var testGitlab = function(sut, done) { }); }; +var testAppVeyor = function(sut, done) { + process.env.APPVEYOR = true; + process.env.APPVEYOR_BUILD_ID = "1234"; + process.env.APPVEYOR_BUILD_NUMBER = "5678"; + process.env.APPVEYOR_REPO_COMMIT = "e3e3e3e3e3e3e3e3e"; + process.env.APPVEYOR_REPO_BRANCH = "feature"; + + sut(function(err, options){ + options.service_name.should.equal("appveyor"); + options.service_job_id.should.equal("1234"); + options.service_job_number.should.equal("5678"); + options.git.should.eql({ head: + { id: 'e3e3e3e3e3e3e3e3e', + author_name: 'Unknown Author', + author_email: '', + committer_name: 'Unknown Committer', + committer_email: '', + message: 'Unknown Commit Message' }, + branch: 'feature', + remotes: [] }); + done(); + }); +}; + var testSurf = function(sut, done) { process.env.CI_NAME = 'surf'; process.env.SURF_SHA1 = "e3e3e3e3e3e3e3e3e"; |
