test: fix false-pos in runner due to exit code
This commit is contained in:
parent
b0ef223c9d
commit
ac8b798b2f
2 changed files with 6 additions and 2 deletions
|
|
@ -114,7 +114,7 @@ export const testSuite = (
|
|||
`[TEST] suite "${suiteName}": ${passed} of ${tests.length} succeeded\n\n`
|
||||
);
|
||||
if (passed < tests.length) {
|
||||
process.exit(1);
|
||||
process.exitCode = 1;
|
||||
}
|
||||
})();
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue