diff --git a/tests/component/modals/ExportPdfDialog.test.tsx b/tests/component/modals/ExportPdfDialog.test.tsx index 0189d94..8c180d2 100644 --- a/tests/component/modals/ExportPdfDialog.test.tsx +++ b/tests/component/modals/ExportPdfDialog.test.tsx @@ -35,7 +35,7 @@ describe('ExportPdfDialog', () => { }); it('renders an error banner when IPC fails', async () => { - (window.electronAPI.export.pdf as any).mockResolvedValueOnce({ ok: false, error: { code: 'E', message: 'Pandoc not found' } }); + (window.electronAPI.export.pdf as any).mockRejectedValueOnce(new Error('Pandoc not found')); render(); await userEvent.click(screen.getByRole('button', { name: /^export$/i })); expect(await screen.findByText(/pandoc not found/i)).toBeInTheDocument();