node/test/fixtures/test-runner/custom_reporters/throwing.js
Moshe Atlow a4c7f81241
test_runner: catch reporter errors
PR-URL: https://github.com/nodejs/node/pull/49646
Fixes: https://github.com/nodejs/node/issues/48937
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2023-09-21 23:22:21 +03:00

6 lines
146 B
JavaScript

'use strict';
module.exports = async function * customReporter() {
yield 'Going to throw an error\n';
throw new Error('Reporting error');
};