@@ -80,26 +80,6 @@ test('can parse string context from command line arguments with equals sign in v
8080 expect ( settings2 . get ( [ 'context' ] ) . foo ) . toEqual ( 'bar=' ) ;
8181} ) ;
8282
83- test ( 'can parse context from command line arguments and convert value to correct type' , ( ) => {
84- // GIVEN
85- const settings1 = Settings . fromCommandLineArguments ( { context : [ 'foo=false' ] , _ : [ Command . DEPLOY ] } ) ;
86- const settings2 = Settings . fromCommandLineArguments ( { context : [ 'foo=0' ] , _ : [ Command . DEPLOY ] } ) ;
87- const settings3 = Settings . fromCommandLineArguments ( { context : [ 'foo=true' ] , _ : [ Command . DEPLOY ] } ) ;
88- const settings4 = Settings . fromCommandLineArguments ( { context : [ 'foo={"a": "b", "c": true, "d": ["a", "b"]}' ] , _ : [ Command . DEPLOY ] } ) ;
89- const settings5 = Settings . fromCommandLineArguments ( { context : [ 'foo=34' ] , _ : [ Command . DEPLOY ] } ) ;
90- const settings6 = Settings . fromCommandLineArguments ( { context : [ 'foo=34 35' ] , _ : [ Command . DEPLOY ] } ) ;
91- const settings7 = Settings . fromCommandLineArguments ( { context : [ 'foo=0x22' ] , _ : [ Command . DEPLOY ] } ) ;
92-
93- // THEN
94- expect ( settings1 . get ( [ 'context' ] ) . foo ) . toEqual ( false ) ;
95- expect ( settings2 . get ( [ 'context' ] ) . foo ) . toEqual ( 0 ) ;
96- expect ( settings3 . get ( [ 'context' ] ) . foo ) . toEqual ( true ) ;
97- expect ( settings4 . get ( [ 'context' ] ) . foo ) . toEqual ( { a : 'b' , c : true , d : [ 'a' , 'b' ] } ) ;
98- expect ( settings5 . get ( [ 'context' ] ) . foo ) . toEqual ( 34 ) ;
99- expect ( settings6 . get ( [ 'context' ] ) . foo ) . toEqual ( '34 35' ) ;
100- expect ( settings7 . get ( [ 'context' ] ) . foo ) . toEqual ( '0x22' ) ;
101- } ) ;
102-
10383test ( 'bundling stacks defaults to an empty list' , ( ) => {
10484 // GIVEN
10585 const settings = Settings . fromCommandLineArguments ( {
@@ -174,4 +154,4 @@ test('providing a build arg', () => {
174154
175155 // THEN
176156 expect ( settings . get ( [ 'build' ] ) ) . toEqual ( 'mvn package' ) ;
177- } ) ;
157+ } ) ;
0 commit comments