Pause the execution of an async function until timer elapse. * @Returns a promise that will resolve after the specified timeout.
(timeout)
| 364 | * @Returns a promise that will resolve after the specified timeout. |
| 365 | */ |
| 366 | function asyncDelay(timeout) { |
| 367 | return new Promise(function (resolve, reject) { |
| 368 | setTimeout(resolve, timeout, true) |
| 369 | }) |
| 370 | } |
| 371 | |
| 372 | function PromiseSource() { |
| 373 | const srcPromise = new Promise((resolve, reject) => { |
no test coverage detected