Skip to content

Commit a55f85d

Browse files
committed
chore: throw instead of exitCode
1 parent bb448d3 commit a55f85d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/bench/granular/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export function getMixedTestTags(documentPath: string) {
6161
export async function runSuiteAndWriteResults(suite: Suite) {
6262
const targetDirectory = path.resolve(`${__dirname}/../../etc`);
6363
await suite.run();
64-
if (suite.errors.length) process.exitCode = 1;
64+
if (suite.errors.length) throw suite.errors[0].error;
6565
await suite.writeResults(`${targetDirectory}/${suite.name.toLowerCase()}Results.json`);
6666
}
6767

test/bench/spec/bsonBench.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ suite.task({
7878
});
7979

8080
suite.run().then(async () => {
81-
if (suite.errors.length) process.exitCode = 1;
81+
if (suite.errors.length) throw suite.errors[0].error;
8282

8383
const cpuBaseline = await readFile(
8484
join(__dirname, '..', '..', 'etc', 'cpuBaseline.json'),

0 commit comments

Comments
 (0)