Skip to content

Commit

Permalink
feat: support string array for ArgParams
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <trae.yelovich@broadcom.com>
  • Loading branch information
traeok committed May 29, 2024
1 parent f918d9b commit 67f2f0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ export default class VSCodeWorkerService implements Services.ServiceInstance {
const args = Object.entries({ ...customArgs, ...this._vscodeOptions.vscodeArgs }).reduce(
(prev, [key, value]) => [
...prev,
`--${decamelize(key, { separator: '-' })}${getValueSuffix(value)}`
Array.isArray(value) ? value.reduce((all: string, val) => {

Check failure on line 164 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, stable)

Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`

Check failure on line 164 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.86.0)

Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`

Check failure on line 164 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, web)

Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`

Check failure on line 164 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.86.0)

Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`
return all + `--${decamelize(key, { separator: '-' })}${getValueSuffix(val)} `;

Check failure on line 165 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, stable)

Unexpected string concatenation

Check failure on line 165 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, stable)

Extra semicolon

Check failure on line 165 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.86.0)

Unexpected string concatenation

Check failure on line 165 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.86.0)

Extra semicolon

Check failure on line 165 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, web)

Unexpected string concatenation

Check failure on line 165 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, web)

Extra semicolon

Check failure on line 165 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.86.0)

Unexpected string concatenation

Check failure on line 165 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.86.0)

Extra semicolon
}, "").trim() : `--${decamelize(key, { separator: '-' })}${getValueSuffix(value)}`

Check failure on line 166 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, stable)

Strings must use singlequote

Check failure on line 166 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 1.86.0)

Strings must use singlequote

Check failure on line 166 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, web)

Strings must use singlequote

Check failure on line 166 in src/service.ts

View workflow job for this annotation

GitHub Actions / build (macos-latest, 1.86.0)

Strings must use singlequote
],
[] as string[]
)
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface ServerOptions {
port: number
}

export type ArgsParams = Record<string, string | boolean>
export type ArgsParams = Record<string, string | string[] | boolean>

/**
* wdio-vscode-service options
Expand Down

0 comments on commit 67f2f0c

Please sign in to comment.