test(client): keep the login's background trip sync out of the push spec

A successful login starts tripSyncManager.syncAll() without waiting for
it. In authStore.push.test.ts that sync was real and could still be
logging when the worker shut down, which vitest reports as an unhandled
"Closing rpc while onUserConsoleLog was pending" and fails the coverage
job although every test passed. The spec is about push, so the sync is
stubbed.
This commit is contained in:
Maurice
2026-10-08 10:16:33 +02:00
committed by Maurice
parent 8997640ac9
commit 395a7f41fe
@@ -25,6 +25,13 @@ vi.mock('../../../src/sync/syncTriggers', () => ({
unregisterSyncTriggers: vi.fn(),
}));
// Login kicks off a full trip sync it does not wait for. Left real, that sync
// can still be logging when the file's worker shuts down, and vitest reports
// the cut-off console call as an unhandled error. Nothing here is about sync.
vi.mock('../../../src/sync/tripSyncManager', () => ({
tripSyncManager: { syncAll: vi.fn(async () => {}) },
}));
beforeEach(() => {
resetAllStores();
vi.clearAllMocks();