preact-components/tests/utilities.ts

8 lines
161 B
TypeScript
Raw Normal View History

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