test(native): reset the file preview mock between the file opening tests

The second test asserted the preview was not called while the first one's call
was still counted, so it failed whenever both ran in order.
This commit is contained in:
Maurice
2026-11-10 09:55:36 +01:00
parent 1b87c62847
commit 0ac06555cb
+1
View File
@@ -13,6 +13,7 @@ vi.mock('./trekShell', () => ({ TrekShell: { previewFile: vi.fn() } }));
beforeEach(() => {
vi.mocked(Filesystem.writeFile).mockReset().mockResolvedValue({ uri: 'file:///cache/trip.pdf' });
vi.mocked(Share.share).mockReset().mockResolvedValue({});
vi.mocked(TrekShell.previewFile).mockReset();
});
describe('cacheFileName', () => {