(overrides: Record<string, unknown>)
| 566 | } |
| 567 | |
| 568 | async function recordAndReport(overrides: Record<string, unknown>): Promise<{ mainLog: string }> { |
| 569 | const db = initInMemoryDb(); |
| 570 | registerDiagnosticsIpc(db); |
| 571 | await invoke('diagnostics:v1:reportEvent', { |
| 572 | schemaVersion: 1, |
| 573 | error: { |
| 574 | localId: 'local-bundle', |
| 575 | code: 'BUNDLE_TEST', |
| 576 | scope: 'renderer:app', |
| 577 | fingerprint: 'fp-bundle', |
| 578 | message: 'bundle check', |
| 579 | ts: Date.now(), |
| 580 | }, |
| 581 | includePromptText: false, |
| 582 | includePaths: false, |
| 583 | includeUrls: false, |
| 584 | includeTimeline: true, |
| 585 | notes: '', |
| 586 | timeline: [], |
| 587 | ...overrides, |
| 588 | }); |
| 589 | const mainLog = capturedFiles.get('main.log'); |
| 590 | if (mainLog === undefined) throw new Error('main.log not captured'); |
| 591 | return { mainLog }; |
| 592 | } |
| 593 | |
| 594 | it('bundle main.log is scrubbed for paths when includePaths=false', async () => { |
| 595 | await writeTestLog( |
no test coverage detected