()
| 31 | }) |
| 32 | |
| 33 | function asyncQueue() { |
| 34 | return new Promise((res) => { |
| 35 | const timer = new Timer() |
| 36 | const queue = smartQueue(noOp, { |
| 37 | max: 7, |
| 38 | interval: 1000, |
| 39 | throttle: true, |
| 40 | onEmpty: () => { |
| 41 | const timeEnd = timer.runtimeMs() |
| 42 | return res(timeEnd) |
| 43 | } |
| 44 | }) |
| 45 | addItems(queue, 25) |
| 46 | }) |
| 47 | } |
| 48 | |
| 49 | test('Processes queue', async () => { |
| 50 | const fin = await asyncQueue() |
no test coverage detected