@@ -54,8 +54,9 @@ test.serial('Publish a release', async t => {
54
54
} )
55
55
. reply ( 200 , { upload_url : uploadUrl , html_url : releaseUrl } ) ;
56
56
57
- await publish ( pluginConfig , { options, nextRelease, logger : t . context . logger } ) ;
57
+ const result = await publish ( pluginConfig , { options, nextRelease, logger : t . context . logger } ) ;
58
58
59
+ t . is ( result . url , releaseUrl ) ;
59
60
t . deepEqual ( t . context . log . args [ 0 ] , [ 'Published GitHub release: %s' , releaseUrl ] ) ;
60
61
t . true ( github . isDone ( ) ) ;
61
62
} ) ;
@@ -91,8 +92,9 @@ test.serial('Publish a release with one asset', async t => {
91
92
. post ( `${ uploadUri } ?name=${ escape ( '.dotfile' ) } &label=${ escape ( 'A dotfile with no ext' ) } ` )
92
93
. reply ( 200 , { browser_download_url : assetUrl } ) ;
93
94
94
- await publish ( pluginConfig , { options, nextRelease, logger : t . context . logger } ) ;
95
+ const result = await publish ( pluginConfig , { options, nextRelease, logger : t . context . logger } ) ;
95
96
97
+ t . is ( result . url , releaseUrl ) ;
96
98
t . deepEqual ( t . context . log . args [ 0 ] , [ 'Published GitHub release: %s' , releaseUrl ] ) ;
97
99
t . deepEqual ( t . context . log . args [ 1 ] , [ 'Published file %s' , assetUrl ] ) ;
98
100
t . true ( github . isDone ( ) ) ;
@@ -139,8 +141,9 @@ test.serial('Publish a release with one asset and custom github url', async t =>
139
141
. post ( `${ uploadUri } ?name=${ escape ( 'upload.txt' ) } &label=${ escape ( 'A text file' ) } ` )
140
142
. reply ( 200 , { browser_download_url : assetUrl } ) ;
141
143
142
- await publish ( pluginConfig , { options, nextRelease, logger : t . context . logger } ) ;
144
+ const result = await publish ( pluginConfig , { options, nextRelease, logger : t . context . logger } ) ;
143
145
146
+ t . is ( result . url , releaseUrl ) ;
144
147
t . deepEqual ( t . context . log . args [ 0 ] , [ 'Published GitHub release: %s' , releaseUrl ] ) ;
145
148
t . deepEqual ( t . context . log . args [ 1 ] , [ 'Published file %s' , assetUrl ] ) ;
146
149
t . true ( github . isDone ( ) ) ;
@@ -169,8 +172,9 @@ test.serial('Publish a release with an array of missing assets', async t => {
169
172
} )
170
173
. reply ( 200 , { upload_url : uploadUrl , html_url : releaseUrl } ) ;
171
174
172
- await publish ( pluginConfig , { options, nextRelease, logger : t . context . logger } ) ;
175
+ const result = await publish ( pluginConfig , { options, nextRelease, logger : t . context . logger } ) ;
173
176
177
+ t . is ( result . url , releaseUrl ) ;
174
178
t . deepEqual ( t . context . log . args [ 0 ] , [ 'Published GitHub release: %s' , releaseUrl ] ) ;
175
179
t . deepEqual ( t . context . error . args [ 0 ] , [
176
180
'The asset %s cannot be read, and will be ignored.' ,
0 commit comments