authorgravatar for julius0216@outlook.comJulius Marminge <julius0216@outlook.com> 2026-09-05 00:12:43-07:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-05 00:12:43-07:00
loga9caf7b7089afb6f1b3b888ea404b75b8f9e88e1
tree4d75c931429f440ff28572d4c219e8e02ee97161
parent14da634577773d291c494635c1a4bcdb0e70f9ee
signature Signed by PGP key B5690EEEBB952194

refactor(desktop): remove test-only Electron error predicates (#9982)


8 files changed, 0 insertions(+), 12 deletions(-)

apps/desktop/src/electron/ElectronDialog.test.ts-1
...@@ -43,7 +43,6 @@ describe("ElectronDialog", () => {...@@ -43,7 +43,6 @@ describe("ElectronDialog", () => {
43 );43 );
4444
45 assert.instanceOf(error, ElectronDialog.ElectronDialogPickFolderError);45 assert.instanceOf(error, ElectronDialog.ElectronDialogPickFolderError);
46 assert.isTrue(ElectronDialog.isElectronDialogError(error));
47 assert.strictEqual(error.ownerWindowId, 7);46 assert.strictEqual(error.ownerWindowId, 7);
48 assert.strictEqual(error.defaultPath, "/workspace");47 assert.strictEqual(error.defaultPath, "/workspace");
49 assert.strictEqual(error.cause, cause);48 assert.strictEqual(error.cause, cause);
apps/desktop/src/electron/ElectronDialog.ts-1
...@@ -73,7 +73,6 @@ export const ElectronDialogError = Schema.Union([...@@ -73,7 +73,6 @@ export const ElectronDialogError = Schema.Union([
73 ElectronDialogShowErrorBoxError,73 ElectronDialogShowErrorBoxError,
74]);74]);
75export type ElectronDialogError = typeof ElectronDialogError.Type;75export type ElectronDialogError = typeof ElectronDialogError.Type;
76export const isElectronDialogError = Schema.is(ElectronDialogError);
7776
78export interface ElectronDialogPickFolderInput {77export interface ElectronDialogPickFolderInput {
79 readonly owner: Option.Option<Electron.BrowserWindow>;78 readonly owner: Option.Option<Electron.BrowserWindow>;
apps/desktop/src/electron/ElectronTheme.test.ts-1
...@@ -64,7 +64,6 @@ describe("ElectronTheme", () => {...@@ -64,7 +64,6 @@ describe("ElectronTheme", () => {
64 const error = yield* Effect.flip(electronTheme.setSource("dark"));64 const error = yield* Effect.flip(electronTheme.setSource("dark"));
6565
66 assert.instanceOf(error, ElectronTheme.ElectronThemeSetSourceError);66 assert.instanceOf(error, ElectronTheme.ElectronThemeSetSourceError);
67 assert.isTrue(ElectronTheme.isElectronThemeSetSourceError(error));
68 assert.strictEqual(error.source, "dark");67 assert.strictEqual(error.source, "dark");
69 assert.strictEqual(error.cause, cause);68 assert.strictEqual(error.cause, cause);
70 assert.include(error.message, "dark");69 assert.include(error.message, "dark");
apps/desktop/src/electron/ElectronTheme.ts-2
...@@ -19,8 +19,6 @@ export class ElectronThemeSetSourceError extends Schema.TaggedErrorClass<Electro...@@ -19,8 +19,6 @@ export class ElectronThemeSetSourceError extends Schema.TaggedErrorClass<Electro
19 }19 }
20}20}
2121
22export const isElectronThemeSetSourceError = Schema.is(ElectronThemeSetSourceError);
23
24export class ElectronTheme extends Context.Service<22export class ElectronTheme extends Context.Service<
25 ElectronTheme,23 ElectronTheme,
26 {24 {
apps/desktop/src/electron/ElectronUpdater.test.ts-3
...@@ -71,7 +71,6 @@ describe("ElectronUpdater", () => {...@@ -71,7 +71,6 @@ describe("ElectronUpdater", () => {
71 const error = yield* updater.checkForUpdates.pipe(Effect.flip);71 const error = yield* updater.checkForUpdates.pipe(Effect.flip);
7272
73 assert.instanceOf(error, ElectronUpdater.ElectronUpdaterCheckForUpdatesError);73 assert.instanceOf(error, ElectronUpdater.ElectronUpdaterCheckForUpdatesError);
74 assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
75 assert.equal(error.channel, "beta");74 assert.equal(error.channel, "beta");
76 assert.strictEqual(error.cause, cause);75 assert.strictEqual(error.cause, cause);
77 assert.equal(error.message, "Electron updater failed to check for updates on channel beta.");76 assert.equal(error.message, "Electron updater failed to check for updates on channel beta.");
...@@ -89,7 +88,6 @@ describe("ElectronUpdater", () => {...@@ -89,7 +88,6 @@ describe("ElectronUpdater", () => {
89 const error = yield* updater.downloadUpdate.pipe(Effect.flip);88 const error = yield* updater.downloadUpdate.pipe(Effect.flip);
9089
91 assert.instanceOf(error, ElectronUpdater.ElectronUpdaterDownloadUpdateError);90 assert.instanceOf(error, ElectronUpdater.ElectronUpdaterDownloadUpdateError);
92 assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
93 assert.equal(error.channel, "nightly");91 assert.equal(error.channel, "nightly");
94 assert.strictEqual(error.cause, cause);92 assert.strictEqual(error.cause, cause);
95 assert.equal(93 assert.equal(
...@@ -126,7 +124,6 @@ describe("ElectronUpdater", () => {...@@ -126,7 +124,6 @@ describe("ElectronUpdater", () => {
126 .pipe(Effect.flip);124 .pipe(Effect.flip);
127125
128 assert.instanceOf(error, ElectronUpdater.ElectronUpdaterQuitAndInstallError);126 assert.instanceOf(error, ElectronUpdater.ElectronUpdaterQuitAndInstallError);
129 assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
130 assert.equal(error.channel, "alpha");127 assert.equal(error.channel, "alpha");
131 assert.equal(error.isSilent, true);128 assert.equal(error.isSilent, true);
132 assert.equal(error.isForceRunAfter, false);129 assert.equal(error.isForceRunAfter, false);
apps/desktop/src/electron/ElectronUpdater.ts-1
...@@ -54,7 +54,6 @@ export const ElectronUpdaterError = Schema.Union([...@@ -54,7 +54,6 @@ export const ElectronUpdaterError = Schema.Union([
54 ElectronUpdaterQuitAndInstallError,54 ElectronUpdaterQuitAndInstallError,
55]);55]);
56export type ElectronUpdaterError = typeof ElectronUpdaterError.Type;56export type ElectronUpdaterError = typeof ElectronUpdaterError.Type;
57export const isElectronUpdaterError = Schema.is(ElectronUpdaterError);
5857
59export class ElectronUpdater extends Context.Service<58export class ElectronUpdater extends Context.Service<
60 ElectronUpdater,59 ElectronUpdater,
apps/desktop/src/electron/ElectronWindow.test.ts-1
...@@ -79,7 +79,6 @@ describe("ElectronWindow", () => {...@@ -79,7 +79,6 @@ describe("ElectronWindow", () => {
79 const error = yield* electronWindow.create(options).pipe(Effect.flip);79 const error = yield* electronWindow.create(options).pipe(Effect.flip);
8080
81 assert.instanceOf(error, ElectronWindow.ElectronWindowCreateError);81 assert.instanceOf(error, ElectronWindow.ElectronWindowCreateError);
82 assert.isTrue(ElectronWindow.isElectronWindowCreateError(error));
83 assert.deepEqual(error.options, {82 assert.deepEqual(error.options, {
84 title: "T3 Code",83 title: "T3 Code",
85 width: 1100,84 width: 1100,
apps/desktop/src/electron/ElectronWindow.ts-2
...@@ -58,8 +58,6 @@ export class ElectronWindowCreateError extends Schema.TaggedErrorClass<ElectronW...@@ -58,8 +58,6 @@ export class ElectronWindowCreateError extends Schema.TaggedErrorClass<ElectronW
58 }58 }
59}59}
6060
61export const isElectronWindowCreateError = Schema.is(ElectronWindowCreateError);
62
63export class ElectronWindowOperationError extends Schema.TaggedErrorClass<ElectronWindowOperationError>()(61export class ElectronWindowOperationError extends Schema.TaggedErrorClass<ElectronWindowOperationError>()(
64 "ElectronWindowOperationError",62 "ElectronWindowOperationError",
65 {63 {