mirror of
https://github.com/hanzoai/vitest.git
synced 2026-10-30 14:46:34 +00:00
11 lines
331 B
TypeScript
11 lines
331 B
TypeScript
import { it } from 'vitest'
|
|
|
|
it('triggers two rejections and one uncaught exception', async () => {
|
|
void Promise.reject(new Error('first rejection'))
|
|
void Promise.reject(new Error('second rejection'))
|
|
setTimeout(() => {
|
|
throw new Error('uncaught timer')
|
|
}, 0)
|
|
await new Promise(resolve => setTimeout(resolve, 50))
|
|
})
|