Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
test(desktop): stabilize updater preference test against slow-disk race (#5392)
Naiyuan Qingde98b7cb833b
diff --git a/apps/desktop/src/main/updater.test.ts b/apps/desktop/src/main/updater.test.tsindex e62ee9a09b..28221082fe 100644--- a/apps/desktop/src/main/updater.test.ts+++ b/apps/desktop/src/main/updater.test.ts@@ -160,6 +160,12 @@ describe("setupAutoUpdater", () => {);setupAutoUpdater(() => null);+ // Let the async preference load settle before advancing timers; otherwise+ // the in-flight readFile can resolve after afterEach() removes the temp+ // dir, default back to enabled=true, and fire a background check into the+ // next test's freshly-cleared mock (flake on slow CI).+ await invokeIpc("updater:get-preferences");+await vi.advanceTimersByTimeAsync(60 * 60 * 1000 + 5_000);expect(ctx.checkForUpdates).not.toHaveBeenCalled();