Skip to content

Commit eaf93f0

Browse files
committed
Less flakey Bun tests
1 parent 55b99a3 commit eaf93f0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

examples/bun/__integration-tests__/bun.spec.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ const timings = {
1010
waitForResponse: 1999,
1111
}
1212

13-
jest.setTimeout(20000)
13+
jest.setTimeout(30000)
1414

15-
let toSkip = false
15+
let toSkip = true
1616

1717
describe('Bun integration', () => {
1818
let serverUrl: string
1919
beforeAll(async () => {
20-
if (process.versions.node.startsWith('14')) {
21-
toSkip = true
20+
if (process.versions.node.startsWith('18')) {
21+
toSkip = false
2222
return
2323
}
2424
// Start Bun
@@ -37,7 +37,9 @@ describe('Bun integration', () => {
3737
const chunkString = chunk.toString('utf-8')
3838
console.log(chunk.toString('utf-8'))
3939
if (chunkString.includes('Server is running on')) {
40-
resolve(chunkString.split('Server is running on ')[1])
40+
setTimeout(() => {
41+
resolve(chunkString.split('Server is running on ')[1])
42+
}, 5000)
4143
}
4244
})
4345
})

0 commit comments

Comments
 (0)