diff --git a/src/utils/polling.test.js b/src/utils/polling.test.js index 18c3fbf..3c27c94 100644 --- a/src/utils/polling.test.js +++ b/src/utils/polling.test.js @@ -14,7 +14,7 @@ describe("Polling", () => { const poll = new Polling(callback, 100); const spy = jest.spyOn(poll, "callback"); poll.start(); - await sleep(500); + await sleep(501); // +1 for safety poll.end(); await sleep(500); expect(spy).toHaveBeenCalledTimes(5); @@ -25,7 +25,7 @@ describe("Polling", () => { const poll = new Polling(callback, 100); const spy = jest.spyOn(poll, "callback"); poll.start(); - await sleep(1000); + await sleep(1001); // +1 for safety expect(spy).toHaveBeenCalledTimes(5); }); });