diff --git a/test/hooks/useLatestResult-test.tsx b/test/hooks/useLatestResult-test.tsx index f5ea67e920..f4c9280e39 100644 --- a/test/hooks/useLatestResult-test.tsx +++ b/test/hooks/useLatestResult-test.tsx @@ -40,26 +40,26 @@ function LatestResultsComponent({ query, doRequest }) { describe("useLatestResult", () => { it("should return results", async () => { const doRequest = async (query) => { - await sleep(20); + await sleep(180); return query; }; const wrapper = mount(); await act(async () => { - await sleep(25); + await sleep(100); }); expect(wrapper.text()).toEqual("0"); wrapper.setProps({ doRequest, query: 1 }); await act(async () => { - await sleep(10); + await sleep(70); }); wrapper.setProps({ doRequest, query: 2 }); await act(async () => { - await sleep(10); + await sleep(70); }); expect(wrapper.text()).toEqual("0"); await act(async () => { - await sleep(15); + await sleep(120); }); expect(wrapper.text()).toEqual("2"); });