Skip to content

Commit 782ca9a

Browse files
committed
fix(test-utils): Don't swallow assertion errors from checkResult and checkCollector.
1 parent 5d60689 commit 782ca9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/opentelemetry-test-utils/src/test-fixtures.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export async function runTestFixture(
236236
const collector = new TestCollector();
237237
await collector.start();
238238

239-
return new Promise(resolve => {
239+
return new Promise((resolve, reject) => {
240240
execFile(
241241
process.execPath,
242242
opts.argv,
@@ -261,6 +261,8 @@ export async function runTestFixture(
261261
if (opts.checkCollector) {
262262
await opts.checkCollector(collector);
263263
}
264+
} catch(err) {
265+
reject(err);
264266
} finally {
265267
collector.close();
266268
resolve();

0 commit comments

Comments
 (0)