diff --git a/src/main/updater.startup-scheduling.test.ts b/src/main/updater.startup-scheduling.test.ts index 06a1ea041be..a58fa0af049 100644 --- a/src/main/updater.startup-scheduling.test.ts +++ b/src/main/updater.startup-scheduling.test.ts @@ -27,7 +27,12 @@ vi.mock('./local-builds/local-build-feed-server', () => moduleFactories.localBui describe('updater', () => { beforeEach(() => { + // Why: resetUpdaterMocks() uninstalls fake timers, which discards every timer the previous test + // armed; re-faking here keeps this test's timers discardable too. On real timers a stale + // `vi.resetModules()`-orphaned updater instance survived to re-arm its 24h check inside a later + // fake-timer test, adding a phantom checkForUpdates at fake offset 24h. resetUpdaterMocks() + vi.useFakeTimers() }) it('does not load or configure electron-updater during dev setup', async () => {