File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,22 @@ describe('Parse Parameters', () => {
5656 ] )
5757 } )
5858
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+
5975 test ( 'returns parameters list from file' , async ( ) => {
6076 const filename = 'file://' + path . join ( __dirname , 'params.test.json' )
6177 const json = parseParameters ( filename )
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export function parseParameters(parameterOverrides: string): Parameter[] {
4747 throw err
4848 }
4949 }
50+
5051 const parameters = new Map < string , string > ( )
5152 parameterOverrides . split ( ',' ) . forEach ( parameter => {
5253 const [ key , value ] = parameter . trim ( ) . split ( '=' )
You can’t perform that action at this time.
0 commit comments