Skip to content

Commit b747cb8

Browse files
refactor(desktop): remove test-only Electron error predicates
1 parent d2c3e2e commit b747cb8

8 files changed

Lines changed: 0 additions & 12 deletions

File tree

‎apps/desktop/src/electron/ElectronDialog.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ describe("ElectronDialog", () => {
4343
);
4444

4545
assert.instanceOf(error, ElectronDialog.ElectronDialogPickFolderError);
46-
assert.isTrue(ElectronDialog.isElectronDialogError(error));
4746
assert.strictEqual(error.ownerWindowId, 7);
4847
assert.strictEqual(error.defaultPath, "/workspace");
4948
assert.strictEqual(error.cause, cause);

‎apps/desktop/src/electron/ElectronDialog.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ export const ElectronDialogError = Schema.Union([
7373
ElectronDialogShowErrorBoxError,
7474
]);
7575
export type ElectronDialogError = typeof ElectronDialogError.Type;
76-
export const isElectronDialogError = Schema.is(ElectronDialogError);
7776

7877
export interface ElectronDialogPickFolderInput {
7978
readonly owner: Option.Option<Electron.BrowserWindow>;

‎apps/desktop/src/electron/ElectronTheme.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ describe("ElectronTheme", () => {
6464
const error = yield* Effect.flip(electronTheme.setSource("dark"));
6565

6666
assert.instanceOf(error, ElectronTheme.ElectronThemeSetSourceError);
67-
assert.isTrue(ElectronTheme.isElectronThemeSetSourceError(error));
6867
assert.strictEqual(error.source, "dark");
6968
assert.strictEqual(error.cause, cause);
7069
assert.include(error.message, "dark");

‎apps/desktop/src/electron/ElectronTheme.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export class ElectronThemeSetSourceError extends Schema.TaggedErrorClass<Electro
1919
}
2020
}
2121

22-
export const isElectronThemeSetSourceError = Schema.is(ElectronThemeSetSourceError);
23-
2422
export class ElectronTheme extends Context.Service<
2523
ElectronTheme,
2624
{

‎apps/desktop/src/electron/ElectronUpdater.test.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ describe("ElectronUpdater", () => {
7171
const error = yield* updater.checkForUpdates.pipe(Effect.flip);
7272

7373
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterCheckForUpdatesError);
74-
assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
7574
assert.equal(error.channel, "beta");
7675
assert.strictEqual(error.cause, cause);
7776
assert.equal(error.message, "Electron updater failed to check for updates on channel beta.");
@@ -89,7 +88,6 @@ describe("ElectronUpdater", () => {
8988
const error = yield* updater.downloadUpdate.pipe(Effect.flip);
9089

9190
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterDownloadUpdateError);
92-
assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
9391
assert.equal(error.channel, "nightly");
9492
assert.strictEqual(error.cause, cause);
9593
assert.equal(
@@ -126,7 +124,6 @@ describe("ElectronUpdater", () => {
126124
.pipe(Effect.flip);
127125

128126
assert.instanceOf(error, ElectronUpdater.ElectronUpdaterQuitAndInstallError);
129-
assert.isTrue(ElectronUpdater.isElectronUpdaterError(error));
130127
assert.equal(error.channel, "alpha");
131128
assert.equal(error.isSilent, true);
132129
assert.equal(error.isForceRunAfter, false);

‎apps/desktop/src/electron/ElectronUpdater.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ export const ElectronUpdaterError = Schema.Union([
5454
ElectronUpdaterQuitAndInstallError,
5555
]);
5656
export type ElectronUpdaterError = typeof ElectronUpdaterError.Type;
57-
export const isElectronUpdaterError = Schema.is(ElectronUpdaterError);
5857

5958
export class ElectronUpdater extends Context.Service<
6059
ElectronUpdater,

‎apps/desktop/src/electron/ElectronWindow.test.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ describe("ElectronWindow", () => {
7979
const error = yield* electronWindow.create(options).pipe(Effect.flip);
8080

8181
assert.instanceOf(error, ElectronWindow.ElectronWindowCreateError);
82-
assert.isTrue(ElectronWindow.isElectronWindowCreateError(error));
8382
assert.deepEqual(error.options, {
8483
title: "T3 Code",
8584
width: 1100,

‎apps/desktop/src/electron/ElectronWindow.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ export class ElectronWindowCreateError extends Schema.TaggedErrorClass<ElectronW
5858
}
5959
}
6060

61-
export const isElectronWindowCreateError = Schema.is(ElectronWindowCreateError);
62-
6361
export class ElectronWindowOperationError extends Schema.TaggedErrorClass<ElectronWindowOperationError>()(
6462
"ElectronWindowOperationError",
6563
{

0 commit comments

Comments
 (0)