Skip to content

Commit 2c57c37

Browse files
committed
lint
1 parent 90f5116 commit 2c57c37

File tree

3 files changed

+22
-21
lines changed

3 files changed

+22
-21
lines changed

apps/array/src/main/services/updates/service.test.ts

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ describe("UpdatesService", () => {
151151

152152
expect(mockApp.on).toHaveBeenCalledWith(
153153
"browser-window-focus",
154-
expect.any(Function)
154+
expect.any(Function),
155155
);
156156
expect(mockApp.whenReady).toHaveBeenCalled();
157157
});
@@ -278,7 +278,7 @@ describe("UpdatesService", () => {
278278

279279
// Simulate completion
280280
const notAvailableHandler = mockAutoUpdater.on.mock.calls.find(
281-
([event]) => event === "update-not-available"
281+
([event]) => event === "update-not-available",
282282
)?.[1];
283283

284284
if (notAvailableHandler) {
@@ -302,7 +302,7 @@ describe("UpdatesService", () => {
302302

303303
// Simulate update downloaded
304304
const updateDownloadedHandler = mockAutoUpdater.on.mock.calls.find(
305-
([event]) => event === "update-downloaded"
305+
([event]) => event === "update-downloaded",
306306
)?.[1];
307307

308308
if (updateDownloadedHandler) {
@@ -319,7 +319,7 @@ describe("UpdatesService", () => {
319319

320320
// Simulate update downloaded
321321
const updateDownloadedHandler = mockAutoUpdater.on.mock.calls.find(
322-
([event]) => event === "update-downloaded"
322+
([event]) => event === "update-downloaded",
323323
)?.[1];
324324

325325
if (updateDownloadedHandler) {
@@ -353,7 +353,7 @@ describe("UpdatesService", () => {
353353

354354
it("registers all required event handlers", () => {
355355
const registeredEvents = mockAutoUpdater.on.mock.calls.map(
356-
([event]) => event
356+
([event]) => event,
357357
);
358358

359359
expect(registeredEvents).toContain("error");
@@ -373,7 +373,7 @@ describe("UpdatesService", () => {
373373

374374
// Simulate no update available
375375
const notAvailableHandler = mockAutoUpdater.on.mock.calls.find(
376-
([event]) => event === "update-not-available"
376+
([event]) => event === "update-not-available",
377377
)?.[1];
378378

379379
if (notAvailableHandler) {
@@ -393,7 +393,7 @@ describe("UpdatesService", () => {
393393

394394
// Simulate update downloaded with version
395395
const downloadedHandler = mockAutoUpdater.on.mock.calls.find(
396-
([event]) => event === "update-downloaded"
396+
([event]) => event === "update-downloaded",
397397
)?.[1];
398398

399399
if (downloadedHandler) {
@@ -413,7 +413,7 @@ describe("UpdatesService", () => {
413413

414414
// Simulate error
415415
const errorHandler = mockAutoUpdater.on.mock.calls.find(
416-
([event]) => event === "error"
416+
([event]) => event === "error",
417417
)?.[1];
418418

419419
if (errorHandler) {
@@ -432,7 +432,7 @@ describe("UpdatesService", () => {
432432

433433
// Simulate error without starting a check
434434
const errorHandler = mockAutoUpdater.on.mock.calls.find(
435-
([event]) => event === "error"
435+
([event]) => event === "error",
436436
)?.[1];
437437

438438
expect(() => {
@@ -476,7 +476,7 @@ describe("UpdatesService", () => {
476476

477477
// Simulate response before timeout
478478
const notAvailableHandler = mockAutoUpdater.on.mock.calls.find(
479-
([event]) => event === "update-not-available"
479+
([event]) => event === "update-not-available",
480480
)?.[1];
481481

482482
if (notAvailableHandler) {
@@ -504,7 +504,7 @@ describe("UpdatesService", () => {
504504

505505
// Simulate error before timeout
506506
const errorHandler = mockAutoUpdater.on.mock.calls.find(
507-
([event]) => event === "error"
507+
([event]) => event === "error",
508508
)?.[1];
509509

510510
if (errorHandler) {
@@ -532,7 +532,7 @@ describe("UpdatesService", () => {
532532

533533
// Simulate update downloaded
534534
const downloadedHandler = mockAutoUpdater.on.mock.calls.find(
535-
([event]) => event === "update-downloaded"
535+
([event]) => event === "update-downloaded",
536536
)?.[1];
537537

538538
if (downloadedHandler) {
@@ -544,7 +544,7 @@ describe("UpdatesService", () => {
544544

545545
// Get the browser-window-focus callback and call it
546546
const focusCallback = mockApp.on.mock.calls.find(
547-
([event]) => event === "browser-window-focus"
547+
([event]) => event === "browser-window-focus",
548548
)?.[1];
549549

550550
// Reset the handler count
@@ -569,20 +569,21 @@ describe("UpdatesService", () => {
569569
it("performs check every 6 hours", async () => {
570570
await initializeService(service);
571571

572-
const initialCallCount = mockAutoUpdater.checkForUpdates.mock.calls.length;
572+
const initialCallCount =
573+
mockAutoUpdater.checkForUpdates.mock.calls.length;
573574

574575
// Advance 6 hours
575576
await vi.advanceTimersByTimeAsync(6 * 60 * 60 * 1000);
576577

577578
expect(mockAutoUpdater.checkForUpdates.mock.calls.length).toBe(
578-
initialCallCount + 1
579+
initialCallCount + 1,
579580
);
580581

581582
// Advance another 6 hours
582583
await vi.advanceTimersByTimeAsync(6 * 60 * 60 * 1000);
583584

584585
expect(mockAutoUpdater.checkForUpdates.mock.calls.length).toBe(
585-
initialCallCount + 2
586+
initialCallCount + 2,
586587
);
587588
});
588589
});

apps/array/src/main/services/updates/service.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,8 @@ export class UpdatesService extends TypedEventEmitter<UpdatesEvents> {
128128
autoUpdater.on("checking-for-update", () => this.handleCheckingForUpdate());
129129
autoUpdater.on("update-available", () => this.handleUpdateAvailable());
130130
autoUpdater.on("update-not-available", () => this.handleNoUpdate());
131-
autoUpdater.on(
132-
"update-downloaded",
133-
(_event, _releaseNotes, releaseName) =>
134-
this.handleUpdateDownloaded(releaseName),
131+
autoUpdater.on("update-downloaded", (_event, _releaseNotes, releaseName) =>
132+
this.handleUpdateDownloaded(releaseName),
135133
);
136134

137135
// Perform initial check

apps/array/src/renderer/stores/navigationStore.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ vi.mock("@features/task-detail/stores/taskExecutionStore", () => ({
1212
},
1313
}));
1414
vi.mock("@features/workspace/stores/workspaceStore", () => ({
15-
useWorkspaceStore: { getState: () => ({ ensureWorkspace: vi.fn(), workspaces: {} }) },
15+
useWorkspaceStore: {
16+
getState: () => ({ ensureWorkspace: vi.fn(), workspaces: {} }),
17+
},
1618
}));
1719
vi.mock("@stores/registeredFoldersStore", () => ({
1820
useRegisteredFoldersStore: { getState: () => ({ addFolder: vi.fn() }) },

0 commit comments

Comments
 (0)