File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -56,4 +56,38 @@ describe('Cirrus Params', () => {
56
56
const params = providerCirrus . getServiceParams ( inputs )
57
57
expect ( params ) . toMatchObject ( expected )
58
58
} )
59
+
60
+ it ( 'gets correct params for overrides' , ( ) => {
61
+ const inputs = {
62
+ args : {
63
+ branch : 'branch' ,
64
+ build : 3 ,
65
+ pr : '2' ,
66
+ sha : 'testsha' ,
67
+ slug : 'testOrg/testRepo' ,
68
+ } ,
69
+ envs : {
70
+ CI : true ,
71
+ CIRRUS_CI : true ,
72
+ CIRRUS_BRANCH : 'master' ,
73
+ CIRRUS_CHANGE_IN_REPO : 'testingsha' ,
74
+ CIRRUS_BUILD_ID : 2 ,
75
+ CIRRUS_PR : 1 ,
76
+ CIRRUS_REPO_FULL_NAME : 'https:/example.com/repo' ,
77
+ } ,
78
+ }
79
+ const expected = {
80
+ branch : 'branch' ,
81
+ build : 3 ,
82
+ buildURL : '' ,
83
+ commit : 'testsha' ,
84
+ job : '' ,
85
+ pr : '2' ,
86
+ service : 'cirrus-ci' ,
87
+ slug : 'testOrg/testRepo' ,
88
+ }
89
+
90
+ const params = providerCirrus . getServiceParams ( inputs )
91
+ expect ( params ) . toMatchObject ( expected )
92
+ } )
59
93
} )
You can’t perform that action at this time.
0 commit comments