test: check that wiping one of several accounts clears what the desktop app shows

This commit is contained in:
Linus Rath
2026-11-03 12:57:03 +01:00
parent 580a7a645d
commit 0872e094a2
+3
View File
@@ -55,6 +55,9 @@ describe('the store and the OS integration', () => {
const clearSurfaces = vi.fn();
window.bulwarkDesktop = { version: 1, platform: 'win32', os: { clearSurfaces } } as never;
const { wipeAccount } = await import('@/lib/offline/offline-mode');
const { useOfflineStore } = await import('@/lib/offline/state');
// Not the last account, so this isn't the wipe of everything, which clears as well.
useOfflineStore.setState({ enabled: ['alice@one', 'bob@two'] });
await wipeAccount('alice@one').catch(() => {});
expect(clearSurfaces).toHaveBeenCalled();
window.bulwarkDesktop = undefined;