Skip to content

Commit 258582b

Browse files
committed
tests: avoid flaky tests
1 parent fe99594 commit 258582b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/connectObservable.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@ describe("connectObservable", () => {
130130
unmount2()
131131
unmount3()
132132

133-
await wait(90)
133+
await wait(85)
134134
const { unmount: unmount4 } = renderHook(() => useLatestNumber())
135135
expect(nInitCount).toBe(1)
136136
unmount4()
137137

138-
await wait(110)
138+
await wait(125)
139139
renderHook(() => useLatestNumber())
140140
expect(nInitCount).toBe(2)
141141
})
@@ -320,7 +320,7 @@ describe("connectObservable", () => {
320320

321321
await componentAct(async () => {
322322
errStream.error("controlled error")
323-
await wait(0)
323+
await wait(50)
324324
})
325325

326326
expect(errorCallback).toHaveBeenCalledWith(
@@ -357,7 +357,7 @@ describe("connectObservable", () => {
357357

358358
await componentAct(async () => {
359359
errStream.error("controlled error")
360-
await wait(0)
360+
await wait(50)
361361
})
362362

363363
expect(screen.queryByText("Loading...")).toBeNull()

0 commit comments

Comments
 (0)