Skip to content

Commit

Permalink
chore: Updated flaky when test (#2241)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsumners-nr authored Jun 4, 2024
1 parent b235529 commit 4079a0a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/versioned/when/when.tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
})
})
Expand Down

0 comments on commit 4079a0a

Please sign in to comment.