mirror of
https://github.com/nodejs/node.git
synced 2025-12-27 23:41:14 +00:00
This test has been flaky in the CI. It squeezes too many independent test cases into one file, so split it up so that we can mark the persistent flaky test case and leave the unproblematic ones alone. PR-URL: https://github.com/nodejs/node/pull/60568 Refs: https://github.com/nodejs/node/issues/54803 Refs: https://github.com/nodejs/reliability/blob/main/reports/2025-11-03.md Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
17 lines
485 B
JavaScript
17 lines
485 B
JavaScript
// Test that errors thrown in timerified functions bubble up without creating
|
|
// performance timeline entries.
|
|
|
|
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const { timerify, PerformanceObserver } = require('perf_hooks');
|
|
|
|
const obs = new PerformanceObserver(common.mustNotCall());
|
|
obs.observe({ entryTypes: ['function'] });
|
|
const n = timerify(() => {
|
|
throw new Error('test');
|
|
});
|
|
assert.throws(() => n(), /^Error: test$/);
|
|
obs.disconnect();
|