@@ -26,44 +26,39 @@ describe("args", () => {
2626 const result = getArg ( args , {
2727 name : "someBool" ,
2828 alias : "sb" ,
29- type : "bool" ,
3029 } ) ;
31- expect ( result ) . toBe ( true ) ;
30+ expect ( result ) . toBe ( " true" ) ;
3231 } ) ;
3332 it ( "should convert bool string to false" , ( ) => {
3433 const args = [ "--someBool" , "false" ] ;
3534 const result = getArg ( args , {
3635 name : "someBool" ,
3736 alias : "sb" ,
38- type : "bool" ,
3937 } ) ;
40- expect ( result ) . toBe ( false ) ;
38+ expect ( result ) . toBe ( " false" ) ;
4139 } ) ;
4240 it ( "should default value to true if no next value" , ( ) => {
4341 const args = [ "--someBool" ] ;
4442 const result = getArg ( args , {
4543 name : "someBool" ,
4644 alias : "sb" ,
47- type : "bool" ,
4845 } ) ;
49- expect ( result ) . toBe ( true ) ;
46+ expect ( result ) . toBe ( null ) ;
5047 } ) ;
5148 it ( "should default value to true if next value is --name" , ( ) => {
5249 const args = [ "--someBool" , "--someOtherBool" ] ;
5350 const result = getArg ( args , {
5451 name : "someBool" ,
5552 alias : "sb" ,
56- type : "bool" ,
5753 } ) ;
58- expect ( result ) . toBe ( true ) ;
54+ expect ( result ) . toBe ( null ) ;
5955 } ) ;
6056 it ( "should default value to true if next value is -alias" , ( ) => {
6157 const args = [ "--someBool" , "-a" ] ;
6258 const result = getArg ( args , {
6359 name : "someBool" ,
6460 alias : "sb" ,
65- type : "bool" ,
6661 } ) ;
67- expect ( result ) . toBe ( true ) ;
62+ expect ( result ) . toBe ( null ) ;
6863 } ) ;
6964} ) ;
0 commit comments