(expected = 2)
| 77 | }); |
| 78 | |
| 79 | const readRows = async (expected = 2) => { |
| 80 | let lines = []; |
| 81 | for (let i = 0; i < 150; i++) { |
| 82 | if (fs.existsSync(traceFile)) { |
| 83 | lines = fs.readFileSync(traceFile, 'utf8').trim().split('\n').filter(Boolean); |
| 84 | if (lines.length >= expected) break; |
| 85 | } |
| 86 | await sleep(20); |
| 87 | } |
| 88 | return lines.map((l) => JSON.parse(l)); |
| 89 | }; |
| 90 | |
| 91 | try { |
| 92 | await run({ call, readRows }); |
no test coverage detected