test(gateway): add test case for empty auth object loopback probe

This commit is contained in:
administrator 2026-03-17 04:39:49 -07:00
parent 8988768e62
commit 0c311b117d

View File

@ -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",