From 7d20be5fb5e8e12354cc76fed74dd44a6dc1dae1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 8 May 2026 15:02:20 +0100 Subject: [PATCH] test: tighten gateway health auth assertions --- src/gateway/server.auth.compat-baseline.test.ts | 2 +- src/gateway/server.health.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gateway/server.auth.compat-baseline.test.ts b/src/gateway/server.auth.compat-baseline.test.ts index 699f567eead..2155545a668 100644 --- a/src/gateway/server.auth.compat-baseline.test.ts +++ b/src/gateway/server.auth.compat-baseline.test.ts @@ -217,7 +217,7 @@ describe("gateway auth compatibility baseline", () => { }); expect(rotated.ok).toBe(true); const rotatedToken = rotated.ok ? rotated.entry.token : ""; - expect(rotatedToken).toEqual(expect.any(String)); + expect(rotatedToken).toBeTypeOf("string"); expect(rotatedToken.length).toBeGreaterThan(0); const ws = await openWs(port); diff --git a/src/gateway/server.health.test.ts b/src/gateway/server.health.test.ts index 6b6611db0c6..da0e2fd2353 100644 --- a/src/gateway/server.health.test.ts +++ b/src/gateway/server.health.test.ts @@ -167,7 +167,7 @@ describe("gateway server health/presence", () => { await localHarness.close(); const evt = await shutdownP; const evtPayload = evt.payload as { reason?: unknown } | undefined; - expect(evtPayload?.reason).toEqual(expect.any(String)); + expect(evtPayload?.reason).toBe("gateway stopping"); }); test(