Skip to content

Commit 6620ab3

Browse files
test: improve flaky asyncUtilTimeout test
1 parent ef37b90 commit 6620ab3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

test-app/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ <h2>navigate</h2>
132132
createButton('Delayed Button Text')
133133
createButton('Delayed Button Text')
134134
}, 500)
135+
136+
setTimeout(function () {
137+
createButton('Long Delayed Button Text')
138+
}, 2000)
135139
</script>
136140
</body>
137141
</html>

test/async/configure.e2e.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ describe('configure', () => {
1414
})
1515

1616
it('supports setting asyncUtilTimeout', async () => {
17-
configure({asyncUtilTimeout: 0})
17+
configure({asyncUtilTimeout: 3000})
1818

1919
const {findByText} = setupBrowser(browser)
2020

21-
await expect(() =>
22-
findByText('Unique Delayed Button Text'),
23-
).rejects.toThrowError()
21+
expect(await findByText('Long Delayed Button Text')).toBeDefined();
2422
})
2523

2624
it('supports setting computedStyleSupportsPseudoElements', async () => {

0 commit comments

Comments
 (0)