We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd40f08 commit e99d4a4Copy full SHA for e99d4a4
test/pummel/test-timers.js
@@ -36,7 +36,7 @@ const WINDOW = 200; // Why does this need to be so big?
36
assert.ok(diff > 0);
37
console.error(`diff: ${diff}`);
38
39
- assert.ok(1000 <= diff && diff < 1000 + WINDOW);
+ assert.ok(Math.abs(diff - 1000) < WINDOW);
40
}), 1000);
41
}
42
@@ -61,7 +61,7 @@ const WINDOW = 200; // Why does this need to be so big?
61
62
const t = interval_count * 1000;
63
64
- assert.ok(t <= diff && diff < t + (WINDOW * interval_count));
+ assert.ok(Math.abs(diff - t) < WINDOW * interval_count);
65
66
assert.ok(interval_count <= 3, `interval_count: ${interval_count}`);
67
if (interval_count === 3)
0 commit comments