Skip to content

Commit 8b3c87f

Browse files
committed
add failure check
1 parent 5adaadd commit 8b3c87f

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/run-shell.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,16 @@ function sh(binary, args) {
124124

125125
async function runTests() {
126126
const shellBinary = logGroup(`Installing JavaScript Shell: ${SHELL_NAME}`, testSetup);
127-
runTest("Run Complete Suite", () => sh(shellBinary, [CLI_PATH]));
128-
runTest("Run Single Suite", () => {
127+
let success = true;
128+
success &&= runTest("Run Complete Suite", () => sh(shellBinary, [CLI_PATH]));
129+
success &&= runTest("Run Single Suite", () => {
129130
const singleTestArgs = [...BASE_CLI_ARGS_WITH_OPTIONS, "proxy-mobx"];
130131
sh(shellBinary, singleTestArgs);
131132
});
133+
if (!success) {
134+
console.error("TEST FAILURES")
135+
process.exit(1)
136+
}
132137
}
133138

134139
function jsvuOSName() {
@@ -169,7 +174,9 @@ function runTest(testName, test) {
169174
logGroup(testName, test)
170175
} catch(e) {
171176
console.error("TEST FAILED")
177+
return false
172178
}
179+
return true
173180
}
174181

175182
setImmediate(runTests);

0 commit comments

Comments
 (0)