diff --git a/packages/testing/src/delay.ts b/packages/testing/src/delay.ts new file mode 100644 index 0000000000..11c61e00f7 --- /dev/null +++ b/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 => new Promise(res => setTimeout(res, ms ?? 0));