preact-components/tests/utilities.ts

8 lines
161 B
TypeScript

export async function sleep(timeout = 250): Promise<void> {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, timeout);
});
}