tests: Tune `waitForPromise()` poll count test
This should have been done in c222fc5d0b
but I forgot.
pull/4416/head
parent
3e14016214
commit
e0542f903a
|
@ -238,8 +238,10 @@ describe("the test helper", function(){
|
|||
await helper.waitForPromise(() => { checks++; return false; }, 2000, 100)
|
||||
.catch(() => { rejected = true; });
|
||||
expect(rejected).to.be(true);
|
||||
expect(checks).to.be.greaterThan(15);
|
||||
expect(checks).to.be.lessThan(21);
|
||||
// One at the beginning, and 19-20 more depending on whether it's the timeout or the final
|
||||
// poll that wins at 2000ms.
|
||||
expect(checks).to.be.greaterThan(19);
|
||||
expect(checks).to.be.lessThan(22);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue