Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): retry a timed-out Windows update signature check once #21273

Mergedonly21mil(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/21273/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 125 additions and 0 deletions.

x
0 of 2 viewed, 2 left
84 additions and 0 deletionsapps/desktop/src/electron/ElectronUpdater.test.tsModified
View file
@@ -1,5 +1,6 @@
import { assert, describe, it } from "@effect/vitest";
import * as Effect from "effect/Effect";
+import type { VerifyUpdateCodeSignature } from "electron-updater";
import { beforeEach, vi } from "vite-plus/test";
​
const { autoUpdaterMock } = vi.hoisted(() => ({
@@ -13,6 +14,8 @@
fullChangelog: false,
checkForUpdates: vi.fn(() => Promise.resolve(null)),
downloadUpdate: vi.fn(() => Promise.resolve([])),
+ logger: { info: vi.fn(), warn: vi.fn(), error: vi.fn() },
+ verifyUpdateCodeSignature: undefined as VerifyUpdateCodeSignature | undefined,
on: vi.fn(),
quitAndInstall: vi.fn(),
removeListener: vi.fn(),
@@ -43,6 +46,7 @@
autoUpdaterMock.quitAndInstall.mockClear();
autoUpdaterMock.removeListener.mockClear();
autoUpdaterMock.setFeedURL.mockClear();
+ autoUpdaterMock.verifyUpdateCodeSignature = undefined;
});
​
it.effect("scopes updater event listeners", () =>
@@ -136,4 +140,84 @@
assert.deepEqual(autoUpdaterMock.quitAndInstall.mock.calls, [[true, false]]);
}).pipe(Effect.provide(ElectronUpdater.layer)),