File size: 307 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { describe, expect, it } from 'vitest'
import { sleep } from '../sleep'

describe('sleep', () => {
  it('should sleep for the given amount of time', async () => {
    const start = Date.now()
    await sleep(100)
    const end = Date.now()
    expect(end - start).toBeGreaterThanOrEqual(100)
  })
})