File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,22 @@ describe('Parse Parameters', () => {
56
56
] )
57
57
} )
58
58
59
+ test ( 'returns parameters list from string' , async ( ) => {
60
+ const json = parseParameters (
61
+ 'MyParam1=myValue1,MyParam2=myValue2,MyParam2=myValue3'
62
+ )
63
+ expect ( json ) . toEqual ( [
64
+ {
65
+ ParameterKey : 'MyParam1' ,
66
+ ParameterValue : 'myValue1'
67
+ } ,
68
+ {
69
+ ParameterKey : 'MyParam2' ,
70
+ ParameterValue : 'myValue2,myValue3'
71
+ }
72
+ ] )
73
+ } )
74
+
59
75
test ( 'returns parameters list from file' , async ( ) => {
60
76
const filename = 'file://' + path . join ( __dirname , 'params.test.json' )
61
77
const json = parseParameters ( filename )
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export function parseParameters(parameterOverrides: string): Parameter[] {
47
47
throw err
48
48
}
49
49
}
50
+
50
51
const parameters = new Map < string , string > ( )
51
52
parameterOverrides . split ( ',' ) . forEach ( parameter => {
52
53
const [ key , value ] = parameter . trim ( ) . split ( '=' )
You can’t perform that action at this time.
0 commit comments