diff --git a/test/parallel/test-performance-measure.js b/test/parallel/test-performance-measure.js index e9aaca72bdd..949258f96e1 100644 --- a/test/parallel/test-performance-measure.js +++ b/test/parallel/test-performance-measure.js @@ -5,11 +5,12 @@ const assert = require('assert'); const { PerformanceObserver, performance } = require('perf_hooks'); const DELAY = 1000; +const ALLOWED_MARGIN = 10; const expected = ['Start to Now', 'A to Now', 'A to B']; const obs = new PerformanceObserver(common.mustCall((items) => { items.getEntries().forEach(({ name, duration }) => { - assert.ok(duration > DELAY); + assert.ok(duration > (DELAY - ALLOWED_MARGIN)); assert.strictEqual(expected.shift(), name); }); }));