Skip to content

Commit

Permalink
test: delay.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Mar 20, 2024
1 parent 249db10 commit 45a902c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/unit/delay.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { describe, expect, test } from 'vitest';

import { delay } from '../../src/delay';

describe('Test delay functionality', () => {
test('delay', async () => {
const start = Date.now();
await delay(4);
const end = Date.now();

expect(end - start).toBeGreaterThanOrEqual(4000);
});
});

0 comments on commit 45a902c

Please sign in to comment.