g6/tests/unit/util/timeOut.ts

11 lines
214 B
TypeScript
Raw Normal View History

/**
* jest 使 setTimeout
* @param callback
* @param time
*/
export const timerOut = (callback, time = 50) => {
setTimeout(() => {
callback();
}, time);
2020-02-14 10:10:54 +08:00
};