@@ -39,7 +39,10 @@ test.serial('Verify package, token and repository access', async t => {
3939 . reply ( 200 , { permissions : { push : true } } ) ;
4040
4141 await t . notThrows (
42- verify ( { assets} , { repositoryUrl : `git+https://othertesturl.com/${ owner } /${ repo } .git` } , t . context . logger )
42+ verify (
43+ { assets} ,
44+ { options : { repositoryUrl : `git+https://othertesturl.com/${ owner } /${ repo } .git` } , logger : t . context . logger }
45+ )
4346 ) ;
4447 t . true ( github . isDone ( ) ) ;
4548} ) ;
@@ -57,8 +60,7 @@ test.serial('Verify package, token and repository access and custom URL with pre
5760 await t . notThrows (
5861 verify (
5962 { githubUrl, githubApiPathPrefix} ,
60- { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } ,
61- t . context . logger
63+ { options : { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , logger : t . context . logger }
6264 )
6365 ) ;
6466
@@ -76,7 +78,10 @@ test.serial('Verify package, token and repository access and custom URL without
7678 . reply ( 200 , { permissions : { push : true } } ) ;
7779
7880 await t . notThrows (
79- verify ( { githubUrl} , { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , t . context . logger )
81+ verify (
82+ { githubUrl} ,
83+ { options : { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , logger : t . context . logger }
84+ )
8085 ) ;
8186
8287 t . true ( github . isDone ( ) ) ;
@@ -93,7 +98,9 @@ test.serial('Verify package, token and repository with environment variables', a
9398 . get ( `/repos/${ owner } /${ repo } ` )
9499 . reply ( 200 , { permissions : { push : true } } ) ;
95100
96- await t . notThrows ( verify ( { } , { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , t . context . logger ) ) ;
101+ await t . notThrows (
102+ verify ( { } , { options : { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
103+ ) ;
97104
98105 t . true ( github . isDone ( ) ) ;
99106 t . deepEqual ( t . context . log . args [ 0 ] , [ 'Verify GitHub authentication (%s)' , 'https://othertesturl.com:443/prefix' ] ) ;
@@ -110,7 +117,9 @@ test.serial('Verify package, token and repository access with alternative enviro
110117 . get ( `/repos/${ owner } /${ repo } ` )
111118 . reply ( 200 , { permissions : { push : true } } ) ;
112119
113- await t . notThrows ( verify ( { } , { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , t . context . logger ) ) ;
120+ await t . notThrows (
121+ verify ( { } , { options : { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
122+ ) ;
114123 t . true ( github . isDone ( ) ) ;
115124} ) ;
116125
@@ -119,7 +128,10 @@ test.serial('Throw SemanticReleaseError if "assets" option is not a String or an
119128 const assets = 42 ;
120129
121130 const error = await t . throws (
122- verify ( { assets} , { repositoryUrl : 'https://github.com/semantic-release/github.git' } , t . context . logger )
131+ verify (
132+ { assets} ,
133+ { options : { repositoryUrl : 'https://github.com/semantic-release/github.git' } , logger : t . context . logger }
134+ )
123135 ) ;
124136
125137 t . true ( error instanceof SemanticReleaseError ) ;
@@ -131,7 +143,10 @@ test.serial('Throw SemanticReleaseError if "assets" option is an Array with inva
131143 const assets = [ 'file.js' , 42 ] ;
132144
133145 const error = await t . throws (
134- verify ( { assets} , { repositoryUrl : 'https://github.com/semantic-release/github.git' } , t . context . logger )
146+ verify (
147+ { assets} ,
148+ { options : { repositoryUrl : 'https://github.com/semantic-release/github.git' } , logger : t . context . logger }
149+ )
135150 ) ;
136151
137152 t . true ( error instanceof SemanticReleaseError ) ;
@@ -147,7 +162,9 @@ test.serial('Verify "assets" is a String', async t => {
147162 . get ( `/repos/${ owner } /${ repo } ` )
148163 . reply ( 200 , { permissions : { push : true } } ) ;
149164
150- await t . notThrows ( verify ( { assets} , { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , t . context . logger ) ) ;
165+ await t . notThrows (
166+ verify ( { assets} , { options : { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
167+ ) ;
151168
152169 t . true ( github . isDone ( ) ) ;
153170} ) ;
@@ -161,7 +178,9 @@ test.serial('Verify "assets" is an Object with a path property', async t => {
161178 . get ( `/repos/${ owner } /${ repo } ` )
162179 . reply ( 200 , { permissions : { push : true } } ) ;
163180
164- await t . notThrows ( verify ( { assets} , { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , t . context . logger ) ) ;
181+ await t . notThrows (
182+ verify ( { assets} , { options : { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
183+ ) ;
165184
166185 t . true ( github . isDone ( ) ) ;
167186} ) ;
@@ -175,7 +194,9 @@ test.serial('Verify "assets" is an Array of Object with a path property', async
175194 . get ( `/repos/${ owner } /${ repo } ` )
176195 . reply ( 200 , { permissions : { push : true } } ) ;
177196
178- await t . notThrows ( verify ( { assets} , { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , t . context . logger ) ) ;
197+ await t . notThrows (
198+ verify ( { assets} , { options : { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
199+ ) ;
179200
180201 t . true ( github . isDone ( ) ) ;
181202} ) ;
@@ -189,7 +210,9 @@ test.serial('Verify "assets" is an Array of glob Arrays', async t => {
189210 . get ( `/repos/${ owner } /${ repo } ` )
190211 . reply ( 200 , { permissions : { push : true } } ) ;
191212
192- await t . notThrows ( verify ( { assets} , { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , t . context . logger ) ) ;
213+ await t . notThrows (
214+ verify ( { assets} , { options : { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
215+ ) ;
193216
194217 t . true ( github . isDone ( ) ) ;
195218} ) ;
@@ -203,7 +226,9 @@ test.serial('Verify "assets" is an Array of Object with a glob Arrays in path pr
203226 . get ( `/repos/${ owner } /${ repo } ` )
204227 . reply ( 200 , { permissions : { push : true } } ) ;
205228
206- await t . notThrows ( verify ( { assets} , { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , t . context . logger ) ) ;
229+ await t . notThrows (
230+ verify ( { assets} , { options : { repositoryUrl : `git@othertesturl.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
231+ ) ;
207232
208233 t . true ( github . isDone ( ) ) ;
209234} ) ;
@@ -213,7 +238,10 @@ test.serial('Throw SemanticReleaseError if "assets" option is an Object missing
213238 const assets = { name : 'file.js' } ;
214239
215240 const error = await t . throws (
216- verify ( { assets} , { repositoryUrl : 'https://github.com/semantic-release/github.git' } , t . context . logger )
241+ verify (
242+ { assets} ,
243+ { options : { repositoryUrl : 'https://github.com/semantic-release/github.git' } , logger : t . context . logger }
244+ )
217245 ) ;
218246
219247 t . true ( error instanceof SemanticReleaseError ) ;
@@ -227,7 +255,10 @@ test.serial(
227255 const assets = [ { path : 'lib/file.js' } , { name : 'file.js' } ] ;
228256
229257 const error = await t . throws (
230- verify ( { assets} , { repositoryUrl : 'https://github.com/semantic-release/github.git' } , t . context . logger )
258+ verify (
259+ { assets} ,
260+ { options : { repositoryUrl : 'https://github.com/semantic-release/github.git' } , logger : t . context . logger }
261+ )
231262 ) ;
232263
233264 t . true ( error instanceof SemanticReleaseError ) ;
@@ -237,7 +268,7 @@ test.serial(
237268
238269test . serial ( 'Throw SemanticReleaseError for missing github token' , async t => {
239270 const error = await t . throws (
240- verify ( { } , { repositoryUrl : 'https://github.com/semantic-release/github.git' } , t . context . logger )
271+ verify ( { } , { options : { repositoryUrl : 'https://github.com/semantic-release/github.git' } , logger : t . context . logger } )
241272 ) ;
242273
243274 t . true ( error instanceof SemanticReleaseError ) ;
@@ -253,7 +284,7 @@ test.serial('Throw SemanticReleaseError for invalid token', async t => {
253284 . reply ( 401 ) ;
254285
255286 const error = await t . throws (
256- verify ( { } , { repositoryUrl : `https://github.com:${ owner } /${ repo } .git` } , t . context . logger )
287+ verify ( { } , { options : { repositoryUrl : `https://github.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
257288 ) ;
258289
259290 t . true ( error instanceof SemanticReleaseError ) ;
@@ -264,7 +295,7 @@ test.serial('Throw SemanticReleaseError for invalid token', async t => {
264295test . serial ( 'Throw SemanticReleaseError for invalid repositoryUrl' , async t => {
265296 process . env . GITHUB_TOKEN = 'github_token' ;
266297
267- const error = await t . throws ( verify ( { } , { repositoryUrl : 'invalid_url' } , t . context . logger ) ) ;
298+ const error = await t . throws ( verify ( { } , { options : { repositoryUrl : 'invalid_url' } , logger : t . context . logger } ) ) ;
268299
269300 t . true ( error instanceof SemanticReleaseError ) ;
270301 t . is ( error . code , 'EINVALIDGITURL' ) ;
@@ -279,7 +310,7 @@ test.serial("Throw SemanticReleaseError if token doesn't have the push permissio
279310 . reply ( 200 , { permissions : { push : false } } ) ;
280311
281312 const error = await t . throws (
282- verify ( { } , { repositoryUrl : `https://github.com:${ owner } /${ repo } .git` } , t . context . logger )
313+ verify ( { } , { options : { repositoryUrl : `https://github.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
283314 ) ;
284315
285316 t . true ( error instanceof SemanticReleaseError ) ;
@@ -296,7 +327,7 @@ test.serial("Throw SemanticReleaseError if the repository doesn't exist", async
296327 . reply ( 404 ) ;
297328
298329 const error = await t . throws (
299- verify ( { } , { repositoryUrl : `https://github.com:${ owner } /${ repo } .git` } , t . context . logger )
330+ verify ( { } , { options : { repositoryUrl : `https://github.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
300331 ) ;
301332
302333 t . true ( error instanceof SemanticReleaseError ) ;
@@ -313,7 +344,7 @@ test.serial('Throw error if github return any other errors', async t => {
313344 . reply ( 500 ) ;
314345
315346 const error = await t . throws (
316- verify ( { } , { repositoryUrl : `https://github.com:${ owner } /${ repo } .git` } , t . context . logger )
347+ verify ( { } , { options : { repositoryUrl : `https://github.com:${ owner } /${ repo } .git` } , logger : t . context . logger } )
317348 ) ;
318349
319350 t . is ( error . code , 500 ) ;
0 commit comments