@@ -216,7 +216,7 @@ t.test('single arg', t => {
216
216
} )
217
217
218
218
libnpmdiff = async ( [ a , b ] , opts ) => {
219
- t . equal ( a , 'simple-output@latest ' , 'should forward single spec' )
219
+ t . equal ( a , 'simple-output@* ' , 'should forward single spec' )
220
220
t . equal ( b , `file:${ path } ` , 'should compare to cwd' )
221
221
t . match ( opts , npm . flatOptions , 'should forward flat options' )
222
222
}
@@ -460,7 +460,7 @@ t.test('single arg', t => {
460
460
}
461
461
} ,
462
462
libnpmdiff : async ( [ a , b ] , opts ) => {
463
- t . equal ( a , 'lorem@latest ' , 'should target latest version of pkg name' )
463
+ t . equal ( a , 'lorem@* ' , 'should target any version of pkg name' )
464
464
t . equal ( b , `file:${ path } ` , 'should target current cwd' )
465
465
} ,
466
466
} )
@@ -479,7 +479,7 @@ t.test('single arg', t => {
479
479
'package.json' : JSON . stringify ( { version : '1.0.0' } ) ,
480
480
} )
481
481
libnpmdiff = async ( [ a , b ] , opts ) => {
482
- t . equal ( a , 'bar@latest ' , 'should target latest tag of name' )
482
+ t . equal ( a , 'bar@* ' , 'should target any version of pkg name' )
483
483
t . equal ( b , `file:${ path } ` , 'should compare to cwd' )
484
484
}
485
485
@@ -493,7 +493,7 @@ t.test('single arg', t => {
493
493
t . plan ( 2 )
494
494
495
495
libnpmdiff = async ( [ a , b ] , opts ) => {
496
- t . equal ( a , 'foo@latest ' , 'should target latest tag of name' )
496
+ t . equal ( a , 'foo@* ' , 'should target any version of pkg name' )
497
497
t . equal ( b , `file:${ fooPath } ` , 'should compare to cwd' )
498
498
}
499
499
@@ -592,7 +592,7 @@ t.test('first arg is a qualified spec', t => {
592
592
593
593
libnpmdiff = async ( [ a , b ] , opts ) => {
594
594
t . equal ( a , '[email protected] ' , 'should set expected first spec' )
595
- t . equal ( b , 'bar-fork@latest ' , 'should target latest tag if not a dep' )
595
+ t . equal ( b , 'bar-fork@* ' , 'should target any version if not a dep' )
596
596
}
597
597
598
598
config . diff = [ '[email protected] ' , 'bar-fork' ]
@@ -753,7 +753,7 @@ t.test('first arg is a known dependency name', async t => {
753
753
`bar@file:${ resolve ( path , 'node_modules/bar' ) } ` ,
754
754
'should target local node_modules pkg'
755
755
)
756
- t . equal ( b , 'bar-fork@latest ' , 'should set expected second spec' )
756
+ t . equal ( b , 'bar-fork@* ' , 'should set expected second spec' )
757
757
}
758
758
759
759
npm . prefix = path
@@ -840,7 +840,7 @@ t.test('first arg is a valid semver range', t => {
840
840
841
841
libnpmdiff = async ( [ a , b ] , opts ) => {
842
842
t . equal ( a , '[email protected] ' , 'should use name from second arg' )
843
- t . equal ( b , 'bar@latest ' , 'should compare against latest tag ' )
843
+ t . equal ( b , 'bar@* ' , 'should compare against any version ' )
844
844
}
845
845
846
846
config . diff = [ '1.0.0' , 'bar' ]
@@ -884,7 +884,7 @@ t.test('first arg is an unknown dependency name', t => {
884
884
t . plan ( 4 )
885
885
886
886
libnpmdiff = async ( [ a , b ] , opts ) => {
887
- t . equal ( a , 'bar@latest ' , 'should set expected first spec' )
887
+ t . equal ( a , 'bar@* ' , 'should set expected first spec' )
888
888
t . equal ( b , '[email protected] ' , 'should set expected second spec' )
889
889
t . match ( opts , npm . flatOptions , 'should forward flat options' )
890
890
t . match ( opts , { where : fooPath } , 'should forward pacote options' )
@@ -919,7 +919,7 @@ t.test('first arg is an unknown dependency name', t => {
919
919
} )
920
920
921
921
libnpmdiff = async ( [ a , b ] , opts ) => {
922
- t . equal ( a , 'bar-fork@latest ' , 'should use latest tag ' )
922
+ t . equal ( a , 'bar-fork@* ' , 'should use any version ' )
923
923
t . equal (
924
924
b ,
925
925
`bar@file:${ resolve ( path , 'node_modules/bar' ) } ` ,
@@ -940,7 +940,7 @@ t.test('first arg is an unknown dependency name', t => {
940
940
t . plan ( 2 )
941
941
942
942
libnpmdiff = async ( [ a , b ] , opts ) => {
943
- t . equal ( a , 'bar@latest ' , 'should use latest tag ' )
943
+ t . equal ( a , 'bar@* ' , 'should use any version ' )
944
944
t . equal ( b , 'bar@^1.0.0' , 'should use name from first arg' )
945
945
}
946
946
@@ -956,8 +956,8 @@ t.test('first arg is an unknown dependency name', t => {
956
956
t . plan ( 2 )
957
957
958
958
libnpmdiff = async ( [ a , b ] , opts ) => {
959
- t . equal ( a , 'bar@latest ' , 'should use latest tag ' )
960
- t . equal ( b , 'bar-fork@latest ' , 'should use latest tag ' )
959
+ t . equal ( a , 'bar@* ' , 'should use any version ' )
960
+ t . equal ( b , 'bar-fork@* ' , 'should use any version ' )
961
961
}
962
962
963
963
config . diff = [ 'bar' , 'bar-fork' ]
@@ -973,8 +973,8 @@ t.test('first arg is an unknown dependency name', t => {
973
973
974
974
const path = t . testdir ( { } )
975
975
libnpmdiff = async ( [ a , b ] , opts ) => {
976
- t . equal ( a , 'bar@latest ' , 'should use latest tag ' )
977
- t . equal ( b , 'bar-fork@latest ' , 'should use latest tag ' )
976
+ t . equal ( a , 'bar@* ' , 'should use any version ' )
977
+ t . equal ( b , 'bar-fork@* ' , 'should use any version ' )
978
978
}
979
979
980
980
config . diff = [ 'bar' , 'bar-fork' ]
0 commit comments