()
| 128 | const byId = new Map(); |
| 129 | let pending = []; |
| 130 | const flush = async () => { |
| 131 | const inputs = []; |
| 132 | for (const c of pending) inputs.push(c.input); |
| 133 | const internalByEntry = await buildBatch(inputs, mode); |
| 134 | for (const [k, c] of pending.entries()) { |
| 135 | byId.set(c.id, internalByEntry.get(k) || []); |
| 136 | } |
| 137 | pending = []; |
| 138 | }; |
| 139 | for (const c of cases) { |
| 140 | pending.push(c); |
| 141 | if (pending.length === BATCH) await flush(); |
no test coverage detected