Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

sleep.test.ts

11 lines307 Bytes

1import { describe, expect, it } from 'vitest'
2import { sleep } from '../sleep'
3​
4describe('sleep', () => {
5 it('should sleep for the given amount of time', async () => {
6 const start = Date.now()
7 await sleep(100)
8 const end = Date.now()
9 expect(end - start).toBeGreaterThanOrEqual(100)
10 })
11})