Skip to content

Commit

Permalink
fix: prettier & linter
Browse files Browse the repository at this point in the history
Signed-off-by: axel7083 <[email protected]>
  • Loading branch information
axel7083 committed Mar 8, 2024
1 parent dcb3e14 commit 93fcb0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions packages/backend/src/registries/ContainerRegistry.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const mocks = vi.hoisted(() => ({
DisposableCreateMock: vi.fn(),
}));


vi.mock('@podman-desktop/api', async () => {
return {
EventEmitter: vi.fn(),
Expand All @@ -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<unknown>)
} as unknown as EventEmitter<unknown>);
});

test('ContainerRegistry init', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/registries/ContainerRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit 93fcb0c

Please sign in to comment.