aboutsummaryrefslogtreecommitdiff
path: root/test/getOptions.js
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2019-10-26 16:11:56 +0300
committerXhmikosR <[email protected]>2019-10-26 16:21:38 +0300
commit150e39b162afb0637a8228333a6e7f2e7e9fe28e (patch)
treea607ccc9879219e9f5e015afc82add12322ef9c2 /test/getOptions.js
parent2ed185ca3626591549ed33c2363a47b824a39d0f (diff)
downloadnode-coveralls-150e39b162afb0637a8228333a6e7f2e7e9fe28e.tar.xz
node-coveralls-150e39b162afb0637a8228333a6e7f2e7e9fe28e.zip
Add AppVeyor test.
Diffstat (limited to 'test/getOptions.js')
-rw-r--r--test/getOptions.js27
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";