From 0ac06555cb2a8f73b3685e17280492a8a331d7e1 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 10 Nov 2026 09:55:36 +0100 Subject: [PATCH] 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. --- client/src/native/nativeFiles.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/client/src/native/nativeFiles.test.ts b/client/src/native/nativeFiles.test.ts index 08f5b147e..8e58305d2 100644 --- a/client/src/native/nativeFiles.test.ts +++ b/client/src/native/nativeFiles.test.ts @@ -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', () => {