From 6f3736dcb9a6e98b457846a45da76d369874ccd6 Mon Sep 17 00:00:00 2001 From: Julien Goux Date: Thu, 5 Nov 2026 16:30:35 +0100 Subject: [PATCH] test(cli): match the sentinel API port exactly in the gen types e2e test The local stack's random port can start with 1, so the substring check also matched legitimate output such as 127.0.0.1:1663 and failed about 1 run in 9. --- apps/cli/src/commands/gen/types/types.e2e.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/cli/src/commands/gen/types/types.e2e.test.ts b/apps/cli/src/commands/gen/types/types.e2e.test.ts index 9c9539a7d4..64bee63cab 100644 --- a/apps/cli/src/commands/gen/types/types.e2e.test.ts +++ b/apps/cli/src/commands/gen/types/types.e2e.test.ts @@ -286,7 +286,8 @@ function expectNoRemoteAuthPath(result: { stdout: string; stderr: string }) { const output = combinedOutput(result); expect(output).not.toContain("Access token not provided"); expect(output).not.toContain("api.supabase.com"); - expect(output).not.toContain("127.0.0.1:1"); + // The local stack's random port can start with 1, so match port 1 exactly. + expect(output).not.toMatch(/127\.0\.0\.1:1(?!\d)/); } function expectLanguageShape(lang: TypegenLang, stdout: string) {