1
0
Fork 0
mirror of synced 2024-07-11 17:26:01 +12:00
budibase/packages/server/tests/helpers.js

9 lines
199 B
JavaScript
Raw Normal View History

2020-02-26 04:21:23 +13:00
const timeout = ms => new Promise(resolve => setTimeout(resolve, ms))
2019-06-29 09:59:27 +12:00
2020-02-26 04:21:23 +13:00
exports.timeout = timeout
module.exports.sleep = async (ms, fn, ...args) => {
await timeout(ms)
return await fn(...args)
}