Skip to content

The agent that grows with you

test(desktop): vault owner suite partial-mocks notifications instead of stubbing two exports

teknium18a0c91f39236
diff --git a/apps/desktop/src/app/settings/vault-settings.owner.test.tsx b/apps/desktop/src/app/settings/vault-settings.owner.test.tsx
index 7de39c4151e..0a33cb52e31 100644
--- a/apps/desktop/src/app/settings/vault-settings.owner.test.tsx
+++ b/apps/desktop/src/app/settings/vault-settings.owner.test.tsx
@@ -22,7 +22,14 @@ vi.mock('@/store/gateway', async importActual => ({
}
}))
vi.mock('@/lib/haptics', () => ({ triggerHaptic: vi.fn() }))
-vi.mock('@/store/notifications', () => ({ notify: vi.fn(), notifyError: vi.fn() }))
+// Partial mock: the profile switch under test also fires module-level
+// subscribers elsewhere in the store graph (cron-model-impact dismisses its
+// notification), so only the two calls this suite asserts on are stubbed.
+vi.mock('@/store/notifications', async importOriginal => ({
+ ...(await importOriginal<Record<string, unknown>>()),
+ notify: vi.fn(),
+ notifyError: vi.fn()
+}))
import { useStore } from '@nanostores/react'