Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

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

Maurice0ac06555cb2a
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', () => {