Skip to content

Commit 8efd196

Browse files
committed
return -1 while test crash due to node heap out of memory
1 parent 8563bff commit 8efd196

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bin/as-test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,10 @@ const testapp = spawn("node", argv, { stdio: "inherit" });
2626
testapp.on("close", function (code) {
2727
exit(code);
2828
});
29+
30+
testapp.on("exit", (_code, signal) => {
31+
if (signal === "SIGABRT") {
32+
// node heap out of memory
33+
exit(-1);
34+
}
35+
});

0 commit comments

Comments
 (0)