From 4079a0ae38e584181eec284963560341941c5dd3 Mon Sep 17 00:00:00 2001 From: James Sumners Date: Tue, 4 Jun 2024 10:07:39 -0400 Subject: [PATCH] chore: Updated flaky when test (#2241) --- test/versioned/when/when.tap.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/versioned/when/when.tap.js b/test/versioned/when/when.tap.js index 4ed1e09055..a243731ac8 100644 --- a/test/versioned/when/when.tap.js +++ b/test/versioned/when/when.tap.js @@ -583,13 +583,12 @@ test('Promise#yield', function (t) { }) test('Promise#delay', function (t) { - testPromiseInstanceMethod(t, 3, function (p, name) { + testPromiseInstanceMethod(t, 2, function (p, name) { const start = Date.now() return p.delay(100).then(function (x) { const end = Date.now() t.same(x, [1, 2, 3, name], name + 'should resolve with original promise') - t.ok(end - start > 98, name + 'should wait close to correct time') - t.ok(end - start < 125, name + 'should wait close to correct time') + t.ok(end - start >= 100, name + 'should delay at least the specified duration') }) }) })