@@ -1587,9 +1587,16 @@ mod tests {
1587
1587
1588
1588
let mut file_path = bin_dir. join ( "echo_test" ) ;
1589
1589
File :: create ( & file_path) . unwrap ( ) ;
1590
+
1591
+ let mut second_file_path = bin_dir. join ( "second_echo_test" ) ;
1592
+ File :: create ( & second_file_path) . unwrap ( ) ;
1593
+
1590
1594
if cfg ! ( windows) {
1591
1595
file_path = file_path. with_extension ( "cmd" ) ;
1592
1596
File :: create ( & file_path) . unwrap ( ) ;
1597
+
1598
+ second_file_path = second_file_path. with_extension ( "cmd" ) ;
1599
+ File :: create ( & second_file_path) . unwrap ( ) ;
1593
1600
}
1594
1601
1595
1602
// create extra files
@@ -1607,11 +1614,28 @@ mod tests {
1607
1614
File :: create ( file_path) . unwrap ( ) ;
1608
1615
}
1609
1616
1617
+ {
1618
+ let file_path = second_file_path. with_extension ( "deno.json" ) ;
1619
+ File :: create ( file_path) . unwrap ( ) ;
1620
+ }
1621
+ {
1622
+ // legacy tsconfig.json, make sure it's cleaned up for now
1623
+ let file_path = second_file_path. with_extension ( "tsconfig.json" ) ;
1624
+ File :: create ( file_path) . unwrap ( ) ;
1625
+ }
1626
+ {
1627
+ let file_path = second_file_path. with_extension ( "lock.json" ) ;
1628
+ File :: create ( file_path) . unwrap ( ) ;
1629
+ }
1630
+
1610
1631
uninstall (
1611
1632
Default :: default ( ) ,
1612
1633
UninstallFlags {
1613
1634
kind : UninstallKind :: Global ( UninstallFlagsGlobal {
1614
- packages : vec ! [ "echo_test" . to_string( ) ] ,
1635
+ packages : vec ! [
1636
+ "echo_test" . to_string( ) ,
1637
+ "second_echo_test" . to_string( ) ,
1638
+ ] ,
1615
1639
root : Some ( temp_dir. path ( ) . to_string ( ) ) ,
1616
1640
} ) ,
1617
1641
} ,
@@ -1624,9 +1648,17 @@ mod tests {
1624
1648
assert ! ( !file_path. with_extension( "deno.json" ) . exists( ) ) ;
1625
1649
assert ! ( !file_path. with_extension( "lock.json" ) . exists( ) ) ;
1626
1650
1651
+ assert ! ( !second_file_path. exists( ) ) ;
1652
+ assert ! ( !second_file_path. with_extension( "tsconfig.json" ) . exists( ) ) ;
1653
+ assert ! ( !second_file_path. with_extension( "deno.json" ) . exists( ) ) ;
1654
+ assert ! ( !second_file_path. with_extension( "lock.json" ) . exists( ) ) ;
1655
+
1627
1656
if cfg ! ( windows) {
1628
1657
file_path = file_path. with_extension ( "cmd" ) ;
1629
1658
assert ! ( !file_path. exists( ) ) ;
1659
+
1660
+ second_file_path = second_file_path. with_extension ( "cmd" ) ;
1661
+ assert ! ( !second_file_path. exists( ) ) ;
1630
1662
}
1631
1663
}
1632
1664
0 commit comments