Skip to content

Commit 4079a0a

Browse files
authoredJun 4, 2024··
chore: Updated flaky when test (#2241)
1 parent b235529 commit 4079a0a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎test/versioned/when/when.tap.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -583,13 +583,12 @@ test('Promise#yield', function (t) {
583583
})
584584

585585
test('Promise#delay', function (t) {
586-
testPromiseInstanceMethod(t, 3, function (p, name) {
586+
testPromiseInstanceMethod(t, 2, function (p, name) {
587587
const start = Date.now()
588588
return p.delay(100).then(function (x) {
589589
const end = Date.now()
590590
t.same(x, [1, 2, 3, name], name + 'should resolve with original promise')
591-
t.ok(end - start > 98, name + 'should wait close to correct time')
592-
t.ok(end - start < 125, name + 'should wait close to correct time')
591+
t.ok(end - start >= 100, name + 'should delay at least the specified duration')
593592
})
594593
})
595594
})

0 commit comments

Comments
 (0)
Please sign in to comment.