Skip to content

Commit

Permalink
feat(testing): add delay function (#1682)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Nov 9, 2023
1 parent e5476e2 commit f83ea57
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/testing/src/delay.ts
@@ -0,0 +1,9 @@
/**
* Will complete after a time delay
*
* @example
* it('Test', async () => {
* await delay(100);
* });
*/
export const delay = (ms?: number): Promise<void> => new Promise(res => setTimeout(res, ms ?? 0));

0 comments on commit f83ea57

Please sign in to comment.