diff --git a/test/parallel/test-perf-hooks-histogram.js b/test/parallel/test-perf-hooks-histogram.js index 37fcdfb3fca..9e76cca2f4f 100644 --- a/test/parallel/test-perf-hooks-histogram.js +++ b/test/parallel/test-perf-hooks-histogram.js @@ -97,6 +97,17 @@ const { inspect } = require('util'); }, 50); } +{ + // Tests that the ELD histogram is disposable + let histogram; + { + using hi = monitorEventLoopDelay(); + histogram = hi; + } + // The histogram should already be disabled. + strictEqual(histogram.disable(), false); +} + { const h = createHistogram(); ok(inspect(h, { depth: null }).startsWith('Histogram'));