@@ -224,9 +224,9 @@ test.serial('Return nothing for an unpublished package', async t => {
224224t . falsy ( nextRelease ) ;
225225} ) ;
226226
227- test ( 'Throw SemanticReleaseError if publish "pkgRoot" option in getLastRelease is not a String' , async t => {
228- const pkg = { name :'invalid-pkgRoot' , publishConfig :{ registry :npmRegistry . url } } ;
229- await outputJson ( './dist/ package.json' , pkg ) ;
227+ test . serial ( 'Throw SemanticReleaseError if publish "pkgRoot" option in getLastRelease is not a String' , async t => {
228+ const pkg = { name :'invalid-pkgRoot' , version : '0.0.0-dev' , publishConfig :{ registry :npmRegistry . url } } ;
229+ await outputJson ( './package.json' , pkg ) ;
230230const pkgRoot = 42 ;
231231const error = await t . throws (
232232t . context . m . getLastRelease (
@@ -242,45 +242,51 @@ test('Throw SemanticReleaseError if publish "pkgRoot" option in getLastRelease i
242242t . is ( error . code , 'EINVALIDPKGROOT' ) ;
243243} ) ;
244244
245- test ( 'Throw SemanticReleaseError if publish "npmPublish" option in verifyConditions is not a Boolean' , async t => {
246- const pkg = { name :'invalid-npmPublish' , version :'0.0.0-dev' , publishConfig :{ registry :npmRegistry . url } } ;
247- await outputJson ( './package.json' , pkg ) ;
248- const npmPublish = 42 ;
249- const error = await t . throws (
250- t . context . m . verifyConditions (
251- { } ,
252- {
253- options :{ publish :[ '@semantic-release/github' , { path :'@semantic-release/npm' , npmPublish} ] } ,
254- logger :t . context . logger ,
255- }
256- )
257- ) ;
245+ test . serial (
246+ 'Throw SemanticReleaseError if publish "npmPublish" option in verifyConditions is not a Boolean' ,
247+ async t => {
248+ const pkg = { name :'invalid-npmPublish' , version :'0.0.0-dev' , publishConfig :{ registry :npmRegistry . url } } ;
249+ await outputJson ( './package.json' , pkg ) ;
250+ const npmPublish = 42 ;
251+ const error = await t . throws (
252+ t . context . m . verifyConditions (
253+ { } ,
254+ {
255+ options :{ publish :[ '@semantic-release/github' , { path :'@semantic-release/npm' , npmPublish} ] } ,
256+ logger :t . context . logger ,
257+ }
258+ )
259+ ) ;
258260
259- t . is ( error . name , 'SemanticReleaseError' ) ;
260- t . is ( error . code , 'EINVALIDNPMPUBLISH' ) ;
261- } ) ;
261+ t . is ( error . name , 'SemanticReleaseError' ) ;
262+ t . is ( error . code , 'EINVALIDNPMPUBLISH' ) ;
263+ }
264+ ) ;
262265
263- test ( 'Throw SemanticReleaseError if publish "tarballDir" option in verifyConditions is not a String' , async t => {
264- const pkg = { name :'invalid-tarballDir' , version :'0.0.0-dev' , publishConfig :{ registry :npmRegistry . url } } ;
265- await outputJson ( './package.json' , pkg ) ;
266- const tarballDir = 42 ;
267- const error = await t . throws (
268- t . context . m . verifyConditions (
269- { } ,
270- {
271- options :{ publish :[ '@semantic-release/github' , { path :'@semantic-release/npm' , tarballDir} ] } ,
272- logger :t . context . logger ,
273- }
274- )
275- ) ;
266+ test . serial (
267+ 'Throw SemanticReleaseError if publish "tarballDir" option in verifyConditions is not a String' ,
268+ async t => {
269+ const pkg = { name :'invalid-tarballDir' , version :'0.0.0-dev' , publishConfig :{ registry :npmRegistry . url } } ;
270+ await outputJson ( './package.json' , pkg ) ;
271+ const tarballDir = 42 ;
272+ const error = await t . throws (
273+ t . context . m . verifyConditions (
274+ { } ,
275+ {
276+ options :{ publish :[ '@semantic-release/github' , { path :'@semantic-release/npm' , tarballDir} ] } ,
277+ logger :t . context . logger ,
278+ }
279+ )
280+ ) ;
276281
277- t . is ( error . name , 'SemanticReleaseError' ) ;
278- t . is ( error . code , 'EINVALIDTARBALLDIR' ) ;
279- } ) ;
282+ t . is ( error . name , 'SemanticReleaseError' ) ;
283+ t . is ( error . code , 'EINVALIDTARBALLDIR' ) ;
284+ }
285+ ) ;
280286
281- test ( 'Throw SemanticReleaseError if publish "pkgRoot" option in verifyConditions is not a String' , async t => {
287+ test . serial ( 'Throw SemanticReleaseError if publish "pkgRoot" option in verifyConditions is not a String' , async t => {
282288const pkg = { name :'invalid-pkgRoot' , version :'0.0.0-dev' , publishConfig :{ registry :npmRegistry . url } } ;
283- await outputJson ( './dist/ package.json' , pkg ) ;
289+ await outputJson ( './package.json' , pkg ) ;
284290const pkgRoot = 42 ;
285291const error = await t . throws (
286292t . context . m . verifyConditions (