(times = 5, ms = 700)
| 19 | // (added while the chain runs) are surfaced. Returns the last error seen, or |
| 20 | // undefined if the chain settled cleanly. |
| 21 | async function drain(times = 5, ms = 700) { |
| 22 | let err |
| 23 | for (let i = 0; i < times; i++) { |
| 24 | try { |
| 25 | await settles(Promise.resolve(recorder.promise()), ms) |
| 26 | } catch (e) { |
| 27 | err = e |
| 28 | } |
| 29 | } |
| 30 | return err |
| 31 | } |
| 32 | |
| 33 | function makeFakeHelper() { |
| 34 | const calls = { start: 0, stop: 0, loadVars: 0, restoreVars: 0, withinBegin: 0, withinEnd: 0 } |
no test coverage detected