| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6881ecb commit aae8ff6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,11 +5,12 @@ const assert = require('assert'); | |||
| 5 | 5 | ||
| 6 | 6 | const { PerformanceObserver, performance } = require('perf_hooks'); | |
| 7 | 7 | const DELAY = 1000; | |
| 8 | + const ALLOWED_MARGIN = 10; | ||
| 8 | 9 | ||
| 9 | 10 | const expected = ['Start to Now', 'A to Now', 'A to B']; | |
| 10 | 11 | const obs = new PerformanceObserver(common.mustCall((items) => { | |
| 11 | 12 | items.getEntries().forEach(({ name, duration }) => { | |
| 12 | - assert.ok(duration > DELAY); | ||
| 13 | + assert.ok(duration > (DELAY - ALLOWED_MARGIN)); | ||
| 13 | 14 | assert.strictEqual(expected.shift(), name); | |
| 14 | 15 | }); | |
| 15 | 16 | })); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments