Skip to content

Commit a64253e

Browse files
committed
fix: timeout issues
1 parent 7fc800b commit a64253e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

fission/src/test/bootstrap/AppMount.test.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,13 @@ describe("React Mounting", async () => {
3232
})
3333

3434
test("Static stylesheets load", async () => {
35-
await wait(500) // need time to load from web
35+
for (let i = 0; i<50;i++) {
36+
await wait(200)
37+
if (document.styleSheets.length >= 2) {
38+
break
39+
}
40+
}
41+
3642
expect(document.styleSheets.length).toBe(2)
3743
const iterable = document.fonts.values()
3844
let iterator = iterable.next()
@@ -87,7 +93,7 @@ describe("React Mounting", async () => {
8793
screen.unmount()
8894

8995
await annotate("Screen unmounted gracefully")
90-
})
96+
}, { timeout: 20000 })
9197
})
9298

9399
function wait(milliseconds: number) {

0 commit comments

Comments
 (0)