diff --git a/apps/desktop/src/store/connections.test.ts b/apps/desktop/src/store/connections.test.ts index cc0a6115a3..737bb7db33 100644 --- a/apps/desktop/src/store/connections.test.ts +++ b/apps/desktop/src/store/connections.test.ts @@ -418,15 +418,10 @@ describe('selectConnection', () => { // Auth is refreshed externally; the very next click must work with the // same module and warm socket, without a cached failed readiness result. await selectConnection('homelab', { profile: 'scout' }) - expect(api.mock.calls).toEqual( - Array.from({ length: 3 }, () => [ - { - connectionId: 'homelab', - profile: 'scout', - path: '/api/profiles', - timeoutMs: 60_000 - } - ]) + expect(api.mock.calls.map(call => (call as unknown[])[0])).toEqual( + Array.from({ length: 3 }, () => + expect.objectContaining({ connectionId: 'homelab', profile: 'scout', path: '/api/profiles' }) + ) ) expect(openGatewayAgent.mock.calls).toEqual(Array.from({ length: 3 }, () => ['homelab', 'scout'])) expect(ensureGatewayAgent).toHaveBeenCalledTimes(1) diff --git a/apps/desktop/src/store/connections.ts b/apps/desktop/src/store/connections.ts index 892ae85b4f..dcbbd04b9c 100644 --- a/apps/desktop/src/store/connections.ts +++ b/apps/desktop/src/store/connections.ts @@ -243,8 +243,9 @@ export async function initializeConnectionsRegistry(): Promise