File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -898,6 +898,15 @@ t.test('latest dist tag', (t) => {
898898 } , new Error ( 'You cannot publish over the previously published versions: 100.0.0.' ) )
899899 } )
900900
901+ t . test ( 'PREVENTS publish when publishing version EXISTS ALREADY in the registry' , async t => {
902+ const version = '50.0.0'
903+ const { npm, registry } = await loadNpmWithRegistry ( t , init ( version ) )
904+ registry . publish ( pkg , { noPut : true , packuments } )
905+ await t . rejects ( async ( ) => {
906+ await npm . exec ( 'publish' , [ ] )
907+ } , new Error ( 'You cannot publish over the previously published versions: 50.0.0.' ) )
908+ } )
909+
901910 t . test ( 'ALLOWS publish when latest is HIGHER than publishing version and flag' , async t => {
902911 const version = '99.0.0'
903912 const { npm, registry } = await loadNpmWithRegistry ( t , {
You can’t perform that action at this time.
0 commit comments