Skip to content

Commit

Permalink
[NO-TICKET] Don't pass the browser tests when they fail! (#3012)
Browse files Browse the repository at this point in the history
Don't pass the tests when they fail!
  • Loading branch information
pwolfert committed Apr 4, 2024
1 parent e49ca36 commit 53b033e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions scripts/browser-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ function verifyPlaywrightInstalled() {
const extraArgs = argv._.map((v) => '' + v);
const playwrightArgs = ['test', ...configArgs, ...extraArgs];

let result;
if (argv.docker) {
// Create the array of args for the docker command
const dockerArgs = [
Expand All @@ -68,7 +69,7 @@ function verifyPlaywrightInstalled() {
];

// And run docker
shI('docker', dockerArgs);
result = shI('docker', dockerArgs);
} else {
// To run outside of docker, we need to have Playwright installed separately
verifyPlaywrightInstalled();
Expand All @@ -85,6 +86,10 @@ function verifyPlaywrightInstalled() {
}

// Run Playwright directly through yarn
shI('yarn', ['playwright', ...playwrightArgs], config);
result = shI('yarn', ['playwright', ...playwrightArgs], config);
}

if (result.error || result.status !== 0) {
process.exit(result.status || 1);
}
})();
2 changes: 1 addition & 1 deletion scripts/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function shI(
args: string[],
config: SpawnSyncOptionsWithBufferEncoding = {}
) {
spawnSync(command, args, { stdio: 'inherit', ...config });
return spawnSync(command, args, { stdio: 'inherit', ...config });
}

export function verifyGhInstalled() {
Expand Down

0 comments on commit 53b033e

Please sign in to comment.