nocobase/testUtils.ts

8 lines
169 B
TypeScript
Raw Normal View History

const globalTimeout = global.setTimeout;
export const sleep = async (timeout = 0) => {
await new Promise((resolve) => {
globalTimeout(resolve, timeout);
});
};