File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -159,10 +159,17 @@ export default class VSCodeWorkerService implements Services.ServiceInstance {
159159
160160 const binary = path . join ( __dirname , 'chromium' , `index.${ process . platform === 'win32' ? 'exe' : 'js' } ` )
161161 const args = Object . entries ( { ...customArgs , ...this . _vscodeOptions . vscodeArgs } ) . reduce (
162- ( prev , [ key , value ] ) => [
163- ...prev ,
164- `--${ decamelize ( key , { separator : '-' } ) } ${ getValueSuffix ( value ) } `
165- ] ,
162+ ( prev , [ key , value ] ) => {
163+ const decamelizedKey = decamelize ( key , { separator : '-' } )
164+ if ( Array . isArray ( value ) ) {
165+ const expandedArgs = value . map (
166+ ( val ) => `--${ decamelizedKey } ${ getValueSuffix ( val ) } `
167+ )
168+ return [ ...prev , ...expandedArgs ]
169+ }
170+
171+ return [ ...prev , `--${ decamelizedKey } ${ getValueSuffix ( value ) } ` ]
172+ } ,
166173 [ ] as string [ ]
167174 )
168175
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export interface ServerOptions {
5252 port : number
5353}
5454
55- export type ArgsParams = Record < string , string | boolean >
55+ export type ArgsParams = Record < string , string | string [ ] | boolean >
5656
5757/**
5858 * wdio-vscode-service options
You can’t perform that action at this time.
0 commit comments