From d9f0ffc424fe6deeebbe0e999c08c106fa747f10 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 9 May 2026 04:13:42 +0100 Subject: [PATCH] test: tighten proxy lifecycle assertions --- src/infra/net/proxy/proxy-lifecycle.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/infra/net/proxy/proxy-lifecycle.test.ts b/src/infra/net/proxy/proxy-lifecycle.test.ts index 337b94e697b..d27d18fbc28 100644 --- a/src/infra/net/proxy/proxy-lifecycle.test.ts +++ b/src/infra/net/proxy/proxy-lifecycle.test.ts @@ -34,10 +34,10 @@ const mockLogInfo = vi.mocked(logInfo); const mockLogWarn = vi.mocked(logWarn); function expectProxyHandle(handle: Awaited>): ProxyHandle { - expect(handle).toEqual(expect.objectContaining({ proxyUrl: expect.any(String) })); if (handle === null) { throw new Error("Expected managed proxy handle"); } + expect(handle.proxyUrl).not.toBe(""); return handle; } @@ -155,10 +155,10 @@ describe("startProxy", () => { }); const activeProxyUrl = getActiveManagedProxyUrl(); - expect(activeProxyUrl).toEqual(expect.any(URL)); if (activeProxyUrl === undefined) { throw new Error("Expected active managed proxy URL"); } + expect(activeProxyUrl).toBeInstanceOf(URL); expect(activeProxyUrl.href).toBe("http://127.0.0.1:3128/"); await stopProxy(expectProxyHandle(handle));