test: remove duplicate validator tests from ui-cov.test.ts#3004
Merged
Conversation
louisgv
approved these changes
Mar 26, 2026
Member
louisgv
left a comment
There was a problem hiding this comment.
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
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>
c7f1003 to
028ad40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
validatorsdescribe block inui-cov.test.tscontained 6 tests that were exact duplicates of tests already covered exhaustively inui-utils.test.tsvalidateServerName: 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)Why this matters
The removed tests only checked one accept + one reject per validator — they provided no signal beyond what
ui-utils.test.tsalready 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 testpasses: 1947 tests, 0 failures (6 duplicate tests removed)bunx @biomejs/biome check src/passes: 0 errors-- qa/dedup-scanner