Skip to content

Commit f262f1f

Browse files
committed
Adapt playground test to exit 1 on unexpected error
1 parent d72c2ae commit f262f1f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

playground/playground_test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ if(result.js_code != "") {
4444
console.log('-- Playground test output --');
4545
console.log(`ReScript version: ${compiler.rescript.version}`);
4646
console.log('----');
47+
if(result.type === "unexpected_error") {
48+
console.log("UNEXPECTED ERROR");
49+
console.log(result.msg);
50+
process.exit(1);
51+
}
4752
if(result.errors && result.errors.length > 0) {
4853
console.log("COMPILATION ERROR");
4954
for(let error of result.errors) {

0 commit comments

Comments
 (0)