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