1
0
Fork 0
mirror of synced 2026-06-05 14:35:14 +00:00
test-reporter/src/wait.ts
2020-10-01 22:53:25 +02:00

9 lines
251 B
TypeScript

export async function wait(milliseconds: number): Promise<string> {
return new Promise(resolve => {
if (isNaN(milliseconds)) {
throw new Error('milliseconds not a number')
}
setTimeout(() => resolve('done!'), milliseconds)
})
}