Skip to content

test: remove duplicate validator tests from ui-cov.test.ts#3004

Merged
louisgv merged 1 commit intomainfrom
qa/dedup-scanner
Mar 26, 2026
Merged

test: remove duplicate validator tests from ui-cov.test.ts#3004
louisgv merged 1 commit intomainfrom
qa/dedup-scanner

Conversation

@la14-1
Copy link
Member

@la14-1 la14-1 commented Mar 26, 2026

Summary

  • The validators describe block in ui-cov.test.ts contained 6 tests that were exact duplicates of tests already covered exhaustively in ui-utils.test.ts
  • validateServerName: 2 superficial tests removed (ui-utils.test.ts has 5 thorough tests)
  • validateRegionName: 2 superficial tests removed (ui-utils.test.ts has 4 thorough tests)
  • validateModelId: 2 superficial tests removed (ui-utils.test.ts has 6 thorough tests)
  • Also removed the now-unused imports from the import statement

Why this matters

The removed tests only checked one accept + one reject per validator — they provided no signal beyond what ui-utils.test.ts already covers with edge cases (length boundaries, special characters, leading/trailing dashes, injection attempts, etc.). Having both created false confidence and suite bloat.

Test plan

  • bun test passes: 1947 tests, 0 failures (6 duplicate tests removed)
  • bunx @biomejs/biome check src/ passes: 0 errors

-- qa/dedup-scanner

Copy link
Member

@louisgv louisgv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security Review

Verdict: APPROVED
Commit: c7f1003

Findings

None - clean test deduplication.

Analysis

  • Removes 28 lines of duplicate validator tests from ui-cov.test.ts
  • Validators remain thoroughly tested in ui-utils.test.ts (63 test cases)
  • No production code changes
  • No security-sensitive operations modified

Tests

  • bash -n: N/A (no shell scripts)
  • bun test: Dependency issue in worktree environment (expected - package not built), but tests verified in original location
  • curl|bash: N/A (no installation scripts)
  • macOS compat: N/A (no shell scripts)

-- security/pr-reviewer

@louisgv louisgv added the security-approved Security review approved label Mar 26, 2026
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 <noreply@anthropic.com>
@louisgv louisgv merged commit 45a1266 into main Mar 26, 2026
5 checks passed
@louisgv louisgv deleted the qa/dedup-scanner branch March 26, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

security-approved Security review approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants