@@ -227,16 +227,14 @@ t.test('throws when invalid tag is semver', async t => {
227
227
} )
228
228
229
229
t . test ( 'throws when invalid tag when not url encodable' , async t => {
230
- const { npm, registry } = await loadNpmWithRegistry ( t , {
230
+ const { npm } = await loadNpmWithRegistry ( t , {
231
231
config : {
232
232
tag : '@test' ,
233
233
} ,
234
234
prefixDir : {
235
235
'package.json' : JSON . stringify ( pkgJson , null , 2 ) ,
236
236
} ,
237
237
} )
238
- registry . publish ( pkg , { noPut : true } )
239
-
240
238
await t . rejects (
241
239
npm . exec ( 'publish' , [ ] ) ,
242
240
{
@@ -272,12 +270,11 @@ t.test('tarball', async t => {
272
270
} )
273
271
274
272
t . test ( 'no auth default registry' , async t => {
275
- const { npm, registry } = await loadNpmWithRegistry ( t , {
273
+ const { npm } = await loadNpmWithRegistry ( t , {
276
274
prefixDir : {
277
275
'package.json' : JSON . stringify ( pkgJson , null , 2 ) ,
278
276
} ,
279
277
} )
280
- registry . publish ( pkg , { noPut : true } )
281
278
await t . rejects (
282
279
npm . exec ( 'publish' , [ ] ) ,
283
280
{
@@ -303,7 +300,7 @@ t.test('no auth dry-run', async t => {
303
300
} )
304
301
305
302
t . test ( 'no auth for configured registry' , async t => {
306
- const { npm, registry } = await loadNpmWithRegistry ( t , {
303
+ const { npm } = await loadNpmWithRegistry ( t , {
307
304
config : {
308
305
registry : alternateRegistry ,
309
306
...auth ,
@@ -312,7 +309,6 @@ t.test('no auth for configured registry', async t => {
312
309
'package.json' : JSON . stringify ( pkgJson , null , 2 ) ,
313
310
} ,
314
311
} )
315
- registry . publish ( pkg , { noPut : true } )
316
312
await t . rejects (
317
313
npm . exec ( 'publish' , [ ] ) ,
318
314
{
@@ -323,7 +319,7 @@ t.test('no auth for configured registry', async t => {
323
319
} )
324
320
325
321
t . test ( 'no auth for scope configured registry' , async t => {
326
- const { npm, registry } = await loadNpmWithRegistry ( t , {
322
+ const { npm } = await loadNpmWithRegistry ( t , {
327
323
config : {
328
324
scope : '@npm' ,
329
325
registry : alternateRegistry ,
@@ -336,7 +332,6 @@ t.test('no auth for scope configured registry', async t => {
336
332
} , null , 2 ) ,
337
333
} ,
338
334
} )
339
- registry . publish ( '@npm/test-package' , { noPut : true } )
340
335
await t . rejects (
341
336
npm . exec ( 'publish' , [ ] ) ,
342
337
{
@@ -435,7 +430,6 @@ t.test('workspaces', t => {
435
430
prefixDir : dir ,
436
431
authorization : token ,
437
432
} )
438
- registry . publish ( 'workspace-p' , { noPut : true } )
439
433
; [ 'workspace-a' , 'workspace-b' , 'workspace-n' ] . forEach ( name => {
440
434
registry . publish ( name )
441
435
} )
@@ -455,7 +449,6 @@ t.test('workspaces', t => {
455
449
prefixDir : dir ,
456
450
authorization : token ,
457
451
} )
458
- registry . publish ( 'workspace-p' , { noPut : true } )
459
452
; [ 'workspace-a' , 'workspace-b' , 'workspace-n' ] . forEach ( name => {
460
453
registry . publish ( name )
461
454
} )
@@ -526,7 +519,6 @@ t.test('workspaces', t => {
526
519
prefixDir : testDir ,
527
520
authorization : token ,
528
521
} )
529
- registry . publish ( '@scoped/workspace-p' , { noPut : true } )
530
522
registry . publish ( 'workspace-a' )
531
523
await npm . exec ( 'publish' , [ ] )
532
524
t . matchSnapshot ( joinedOutput ( ) , 'one marked private' )
@@ -558,7 +550,6 @@ t.test('workspaces', t => {
558
550
prefixDir : dir ,
559
551
authorization : token ,
560
552
} )
561
- registry . publish ( 'workspace-p' , { noPut : true } )
562
553
; [ 'workspace-a' , 'workspace-b' , 'workspace-n' ] . forEach ( name => {
563
554
registry . publish ( name )
564
555
} )
@@ -684,7 +675,7 @@ t.test('bare _auth and registry config', async t => {
684
675
} )
685
676
686
677
t . test ( 'bare _auth config scoped registry' , async t => {
687
- const { npm, registry } = await loadNpmWithRegistry ( t , {
678
+ const { npm } = await loadNpmWithRegistry ( t , {
688
679
config : {
689
680
scope : '@npm' ,
690
681
registry : alternateRegistry ,
@@ -697,7 +688,6 @@ t.test('bare _auth config scoped registry', async t => {
697
688
} , null , 2 ) ,
698
689
} ,
699
690
} )
700
- registry . publish ( '@npm/test-package' , { noPut : true } )
701
691
await t . rejects (
702
692
npm . exec ( 'publish' , [ ] ) ,
703
693
{ message : `This command requires you to be logged in to ${ alternateRegistry } ` }
@@ -895,7 +885,7 @@ t.test('latest dist tag', (t) => {
895
885
registry . publish ( pkg , { noPut : true , packuments } )
896
886
await t . rejects ( async ( ) => {
897
887
await npm . exec ( 'publish' , [ ] )
898
- } , new Error ( 'Cannot publish a lower version without an explicit dist tag.' ) )
888
+ } , new Error ( 'Cannot publish a lower version without an explicit tag.' ) )
899
889
} )
900
890
901
891
t . test ( 'ALLOWS publish when latest is HIGHER than publishing version and flag' , async t => {
0 commit comments