From 93fcb0ca4110b40dd080d688e9449dcdca0f3367 Mon Sep 17 00:00:00 2001 From: axel7083 <42176370+axel7083@users.noreply.github.com> Date: Tue, 5 Mar 2024 16:07:50 +0100 Subject: [PATCH] fix: prettier & linter Signed-off-by: axel7083 <42176370+axel7083@users.noreply.github.com> --- .../backend/src/registries/ContainerRegistry.spec.ts | 9 ++++----- packages/backend/src/registries/ContainerRegistry.ts | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/registries/ContainerRegistry.spec.ts b/packages/backend/src/registries/ContainerRegistry.spec.ts index 264169bf1..1e77e559b 100644 --- a/packages/backend/src/registries/ContainerRegistry.spec.ts +++ b/packages/backend/src/registries/ContainerRegistry.spec.ts @@ -24,7 +24,6 @@ const mocks = vi.hoisted(() => ({ DisposableCreateMock: vi.fn(), })); - vi.mock('@podman-desktop/api', async () => { return { EventEmitter: vi.fn(), @@ -38,17 +37,17 @@ vi.mock('@podman-desktop/api', async () => { }); beforeEach(() => { - let listeners: ((value: unknown) => {})[] = []; + const listeners: ((value: unknown) => {})[] = []; const eventSubscriber = (listener: (value: unknown) => {}) => { listeners.push(listener); - } + }; const fire = (value: unknown) => { listeners.forEach(listener => listener(value)); - } + }; vi.mocked(EventEmitter).mockReturnValue({ event: eventSubscriber, fire: fire, - } as unknown as EventEmitter) + } as unknown as EventEmitter); }); test('ContainerRegistry init', () => { diff --git a/packages/backend/src/registries/ContainerRegistry.ts b/packages/backend/src/registries/ContainerRegistry.ts index 9fa7a2af6..a1622d5f6 100644 --- a/packages/backend/src/registries/ContainerRegistry.ts +++ b/packages/backend/src/registries/ContainerRegistry.ts @@ -35,7 +35,7 @@ export class ContainerRegistry { init(): podmanDesktopApi.Disposable { return podmanDesktopApi.containerEngine.onEvent(event => { - if(event.status === 'start') { + if (event.status === 'start') { this._onStartContainerEvent.fire({ id: event.id, });