diff options
| author | Nick Merwin <[email protected]> | 2019-11-20 17:30:23 -0800 |
|---|---|---|
| committer | Nick Merwin <[email protected]> | 2019-11-20 17:30:23 -0800 |
| commit | ba49b6d1f6c4ab8ea439f155375bfe62380e6dd3 (patch) | |
| tree | 25096da2b98b268fa106c97791059abca160a25f /test | |
| parent | 51890f84c032cbf1ee966d0d1b8b34a1e0f26ed1 (diff) | |
| parent | 150e39b162afb0637a8228333a6e7f2e7e9fe28e (diff) | |
| download | node-coveralls-ba49b6d1f6c4ab8ea439f155375bfe62380e6dd3.tar.xz node-coveralls-ba49b6d1f6c4ab8ea439f155375bfe62380e6dd3.zip | |
Merge branch 'appveyor-tests' of https://github.com/XhmikosR/node-coveralls into XhmikosR-appveyor-tests
Diffstat (limited to '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 d8d3454..ba6ca7d 100644 --- a/test/getOptions.js +++ b/test/getOptions.js @@ -155,6 +155,9 @@ describe('getOptions', () => { it('should set service_name and service_job_id if it\'s running on Gitlab', done => { testGitlab(getOptions, done); }); + it ("should set service_name and service_job_id if it's running on AppVeyor", done => { + testAppVeyor(getOptions, done); + }); it('should set service_name and service_job_id if it\'s running via Surf', done => { testSurf(getOptions, done); }); @@ -524,6 +527,30 @@ const testGitlab = (sut, done) => { }); }; +const 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(); + }); +}; + const testSurf = (sut, done) => { process.env.CI_NAME = 'surf'; process.env.SURF_SHA1 = 'e3e3e3e3e3e3e3e3e'; |
