From 0c311b117d50464e0bada4c247191e006b23ba1c Mon Sep 17 00:00:00 2001 From: administrator Date: Tue, 17 Mar 2026 04:39:49 -0700 Subject: [PATCH] test(gateway): add test case for empty auth object loopback probe --- src/gateway/probe.test.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gateway/probe.test.ts b/src/gateway/probe.test.ts index 4a2374e17cb..8af3c943b6a 100644 --- a/src/gateway/probe.test.ts +++ b/src/gateway/probe.test.ts @@ -71,6 +71,16 @@ describe("probeGateway", () => { expect(gatewayClientState.options?.deviceIdentity).toBeUndefined(); }); + it("keeps device identity enabled for authenticated loopback probes with empty auth object", async () => { + await probeGateway({ + url: "ws://127.0.0.1:18789", + auth: {}, + timeoutMs: 1_000, + }); + + expect(gatewayClientState.options?.deviceIdentity).toBeUndefined(); + }); + it("keeps device identity disabled for unauthenticated loopback probes", async () => { await probeGateway({ url: "ws://127.0.0.1:18789",