diff options
| author | XhmikosR <[email protected]> | 2019-10-26 16:11:56 +0300 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2019-10-26 16:21:38 +0300 |
| commit | 150e39b162afb0637a8228333a6e7f2e7e9fe28e (patch) | |
| tree | a607ccc9879219e9f5e015afc82add12322ef9c2 | |
| parent | 2ed185ca3626591549ed33c2363a47b824a39d0f (diff) | |
| download | node-coveralls-150e39b162afb0637a8228333a6e7f2e7e9fe28e.tar.xz node-coveralls-150e39b162afb0637a8228333a6e7f2e7e9fe28e.zip | |
Add AppVeyor test.
| -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"; |
