diff --git a/tests/frontend/specs/helper.js b/tests/frontend/specs/helper.js index 9d0914013..409982596 100644 --- a/tests/frontend/specs/helper.js +++ b/tests/frontend/specs/helper.js @@ -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); }); });