@@ -155,6 +155,9 @@ describe('getOptions', () => {
155
155
it ( 'should set service_name and service_job_id if it\'s running on Gitlab' , done => {
156
156
testGitlab ( getOptions , done ) ;
157
157
} ) ;
158
+ it ( "should set service_name and service_job_id if it's running on AppVeyor" , done => {
159
+ testAppVeyor ( getOptions , done ) ;
160
+ } ) ;
158
161
it ( 'should set service_name and service_job_id if it\'s running via Surf' , done => {
159
162
testSurf ( getOptions , done ) ;
160
163
} ) ;
@@ -524,6 +527,30 @@ const testGitlab = (sut, done) => {
524
527
} ) ;
525
528
} ;
526
529
530
+ const testAppVeyor = function ( sut , done ) {
531
+ process . env . APPVEYOR = true ;
532
+ process . env . APPVEYOR_BUILD_ID = "1234" ;
533
+ process . env . APPVEYOR_BUILD_NUMBER = "5678" ;
534
+ process . env . APPVEYOR_REPO_COMMIT = "e3e3e3e3e3e3e3e3e" ;
535
+ process . env . APPVEYOR_REPO_BRANCH = "feature" ;
536
+
537
+ sut ( function ( err , options ) {
538
+ options . service_name . should . equal ( "appveyor" ) ;
539
+ options . service_job_id . should . equal ( "1234" ) ;
540
+ options . service_job_number . should . equal ( "5678" ) ;
541
+ options . git . should . eql ( { head :
542
+ { id : 'e3e3e3e3e3e3e3e3e' ,
543
+ author_name : 'Unknown Author' ,
544
+ author_email : '' ,
545
+ committer_name : 'Unknown Committer' ,
546
+ committer_email : '' ,
547
+ message : 'Unknown Commit Message' } ,
548
+ branch : 'feature' ,
549
+ remotes : [ ] } ) ;
550
+ done ( ) ;
551
+ } ) ;
552
+ } ;
553
+
527
554
const testSurf = ( sut , done ) => {
528
555
process . env . CI_NAME = 'surf' ;
529
556
process . env . SURF_SHA1 = 'e3e3e3e3e3e3e3e3e' ;
0 commit comments