Skip to content

Commit da8a72d

Browse files
committed
More stable tests
1 parent 43392bd commit da8a72d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/utils.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ describe('utils', () => {
210210
test('should return false when condition is not met within wait time', async () => {
211211
const condition = vi.fn().mockResolvedValue(false)
212212

213-
const result = await waitUntil(condition, { wait: 200, interval: 50 })
213+
const result = await waitUntil(condition, { wait: 180, interval: 50 })
214214

215215
expect(result).toBe(false)
216216
})
@@ -226,7 +226,7 @@ describe('utils', () => {
226226
test('should return false if condition throws but still return false', async () => {
227227
const condition = vi.fn().mockRejectedValueOnce(new Error('Always failing')).mockRejectedValueOnce(new Error('Always failing')).mockResolvedValue(false)
228228

229-
const result = await waitUntil(condition, { wait: 200, interval: 50 })
229+
const result = await waitUntil(condition, { wait: 180, interval: 50 })
230230

231231
expect(result).toBe(false)
232232
expect(condition).toBeCalledTimes(4)
@@ -239,7 +239,7 @@ describe('utils', () => {
239239
test('should throw with wait', async () => {
240240
const condition = vi.fn().mockRejectedValue(error)
241241

242-
await expect(() => waitUntil(condition, { wait: 200, interval: 50 })).rejects.toThrowError('failing')
242+
await expect(() => waitUntil(condition, { wait: 180, interval: 50 })).rejects.toThrowError('failing')
243243
})
244244

245245
test('should throw with wait 0', async () => {

0 commit comments

Comments
 (0)