mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 15:51:00 +00:00
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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user