Skip to content

Commit

Permalink
do not use empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
tianfeng92 committed Apr 5, 2024
1 parent 52768dd commit 8c0cf39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/playwright-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ async function getCfg(
runCfg.sauce.region = runCfg.sauce.region || 'us-west-1';
runCfg.playwrightOutputFolder =
suite.env?.SAUCE_SYNC_WEB_ASSETS?.toLowerCase() === 'true'
? ''
? undefined
: path.join(runCfg.assetsDir, 'test-results');

runCfg.webAssetsDir =
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export interface RunnerConfig {
preExecTimeout: number;
path: string;
projectPath: string;
playwrightOutputFolder: string;
playwrightOutputFolder?: string;
// webAssetsDir contains assets compatible with the Sauce Labs web UI.
webAssetsDir: string;
webAssetsDir?: string;
suite: Suite;

args: Record<string, unknown>;
Expand Down
4 changes: 3 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ export function replaceLegacyKeys(config: SuiteConfig) {
return args;
}

export function setEnvironmentVariables(envVars: Record<string, string> = {}) {
export function setEnvironmentVariables(
envVars: Record<string, string | undefined> = {},
) {
if (!envVars) {
return;
}
Expand Down

0 comments on commit 8c0cf39

Please sign in to comment.