From 028ad40f60cd23abcdb7e460fe11bf504ed13348 Mon Sep 17 00:00:00 2001 From: spawn-qa-bot Date: Thu, 26 Mar 2026 08:43:49 +0000 Subject: [PATCH] test: remove duplicate validator tests from ui-cov.test.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the `validators` describe block in ui-cov.test.ts duplicated 6 tests that already exist with full edge-case coverage in ui-utils.test.ts: - validateServerName (2 tests) → duplicated by 5 tests in ui-utils.test.ts - validateRegionName (2 tests) → duplicated by 4 tests in ui-utils.test.ts - validateModelId (2 tests) → duplicated by 6 tests in ui-utils.test.ts removed tests only checked one accept+one reject per validator, providing no signal beyond what ui-utils.test.ts already covers exhaustively. also removed the now-unused imports from the import statement. Co-Authored-By: Claude Sonnet 4.6 --- packages/cli/src/__tests__/ui-cov.test.ts | 31 ----------------------- 1 file changed, 31 deletions(-) diff --git a/packages/cli/src/__tests__/ui-cov.test.ts b/packages/cli/src/__tests__/ui-cov.test.ts index 2ddf7dfac..2bcf2092f 100644 --- a/packages/cli/src/__tests__/ui-cov.test.ts +++ b/packages/cli/src/__tests__/ui-cov.test.ts @@ -35,9 +35,6 @@ import { prompt, promptSpawnNameShared, selectFromList, - validateModelId, - validateRegionName, - validateServerName, } from "../shared/ui"; // ── Setup / Teardown ──────────────────────────────────────────────────── @@ -247,34 +244,6 @@ describe("loadApiToken", () => { }); }); -// ── validators ───────────────────────────────────────────────────── - -describe("validators", () => { - it("validateServerName accepts valid names", () => { - expect(validateServerName("my-server-123")).toBe(true); - }); - - it("validateServerName rejects invalid names", () => { - expect(validateServerName("bad name!")).toBe(false); - }); - - it("validateRegionName accepts valid regions", () => { - expect(validateRegionName("us-east-1")).toBe(true); - }); - - it("validateRegionName rejects invalid regions", () => { - expect(validateRegionName("bad region!")).toBe(false); - }); - - it("validateModelId accepts valid model IDs", () => { - expect(validateModelId("anthropic/claude-3.5-sonnet")).toBe(true); - }); - - it("validateModelId rejects invalid model IDs", () => { - expect(validateModelId("bad model ID!")).toBe(false); - }); -}); - // ── defaultSpawnName ─────────────────────────────────────────────── describe("defaultSpawnName", () => {