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, });