diff --git a/apps/code/src/main/services/updates/service.test.ts b/apps/code/src/main/services/updates/service.test.ts index 7a07a88ce..a91bae898 100644 --- a/apps/code/src/main/services/updates/service.test.ts +++ b/apps/code/src/main/services/updates/service.test.ts @@ -713,18 +713,18 @@ describe("UpdatesService", () => { expect(mockUpdater.check).toHaveBeenCalled(); }); - it("performs check every 24 hours", async () => { + it("performs check every hour", async () => { await initializeService(service); const initialCallCount = mockUpdater.check.mock.calls.length; - // Advance 24 hours - await vi.advanceTimersByTimeAsync(24 * 60 * 60 * 1000); + // Advance 1 hour + await vi.advanceTimersByTimeAsync(60 * 60 * 1000); expect(mockUpdater.check.mock.calls.length).toBe(initialCallCount + 1); - // Advance another 24 hours - await vi.advanceTimersByTimeAsync(24 * 60 * 60 * 1000); + // Advance another hour + await vi.advanceTimersByTimeAsync(60 * 60 * 1000); expect(mockUpdater.check.mock.calls.length).toBe(initialCallCount + 2); }); diff --git a/apps/code/src/main/services/updates/service.ts b/apps/code/src/main/services/updates/service.ts index ecfbac89f..fdbec5d1d 100644 --- a/apps/code/src/main/services/updates/service.ts +++ b/apps/code/src/main/services/updates/service.ts @@ -25,7 +25,7 @@ export class UpdatesService extends TypedEventEmitter { private static readonly SERVER_HOST = "https://update.electronjs.org"; private static readonly REPO_OWNER = "PostHog"; private static readonly REPO_NAME = "code"; - private static readonly CHECK_INTERVAL_MS = 24 * 60 * 60 * 1000; // 24 hours + private static readonly CHECK_INTERVAL_MS = 60 * 60 * 1000; // 1 hour private static readonly CHECK_TIMEOUT_MS = 60 * 1000; // 1 minute timeout for checks private static readonly DISABLE_ENV_FLAG = "ELECTRON_DISABLE_AUTO_UPDATE"; private static readonly SUPPORTED_PLATFORMS = ["darwin", "win32"];