test: fix false-pos in runner due to exit code

This commit is contained in:
M. George Hansen 2020-06-01 23:44:33 -07:00
parent 1012cdd3fa
commit a320962aa8
Signed by: mgeorgehansen
SSH key fingerprint: SHA256:JlIGiQLPyQ2RHTH3a2oVlb20Xkh9Glr8DUF4YTXHJxM
2 changed files with 6 additions and 2 deletions

View file

@ -16,5 +16,9 @@ const files = fs.readdirSync(TEST_SUITES_DIR);
shuffle(files);
for (const file of files) {
const fullPath = path.join(TEST_SUITES_DIR, file);
fork(path.relative(process.cwd(), fullPath));
fork(path.relative(process.cwd(), fullPath)).on("exit", (code) => {
if (code !== 0) {
process.exitCode = 1;
}
});
}