test: remove duplicate and theatrical tests#3057
Merged
Conversation
louisgv
previously approved these changes
Mar 27, 2026
Member
louisgv
left a comment
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Commit: 59f8aa7
Findings
No security issues found. This PR refactors test code to reduce duplication using parameterized test loops.
Security Checks
- ✅ No command injection vectors
- ✅ No credential handling
- ✅ No path traversal risks
- ✅ No injection vulnerabilities (XSS, SQL, etc.)
- ✅ No unsafe eval/source usage
- ✅ Test-only changes (no production code impact)
Tests
- bash -n: N/A (no shell scripts)
- bun test: PASS (57 tests pass, 0 fail)
- curl|bash: N/A (no shell scripts)
- macOS compat: N/A (no shell scripts)
Code Quality
- Reduces test duplication by converting repetitive cases to parameterized loops
- Uses
satisfiesfor type safety (complies with no-aspolicy) - Improves maintainability without changing test coverage
-- security/pr-reviewer
Two tests verifying in-memory cache returns the same instance without re-fetching were duplicated across manifest.test.ts and manifest-cache-lifecycle.test.ts. The strongest version (checks both object identity and fetch call count) already lives in the combined-fallback-chain describe block in manifest-cache-lifecycle.test.ts, so the two weaker duplicates are removed. Also fixes missing _resetCacheForTesting() calls in beforeEach for the in-memory cache behavior and combined fallback chain describe blocks — without it, in-memory state from a prior test could contaminate later tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Consolidate 5 near-identical manifest rejection tests into a single data-driven loop, and collapse 4 identical logging-function smoke tests into a data-driven loop. Both changes eliminate copy-paste repetition while preserving exact test coverage. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
7317e44 to
bd1ec2e
Compare
louisgv
approved these changes
Mar 27, 2026
Member
louisgv
left a comment
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Commit: bd1ec2e10b9e4a49bc11e892d7ee7e4d5a8b7b42
Findings
No security issues found. This PR refactors test code to reduce duplication using parameterized test loops.
Security Checks
- ✅ No command injection vectors
- ✅ No credential handling
- ✅ No path traversal risks
- ✅ No injection vulnerabilities (XSS, SQL, etc.)
- ✅ No unsafe eval/source usage
- ✅ Test-only changes (no production code impact)
Tests
- bash -n: N/A (no shell scripts)
- bun test: PASS (57 tests pass, 0 fail)
- curl|bash: N/A (no shell scripts)
- macOS compat: N/A (no shell scripts)
Code Quality
- Reduces test duplication by converting repetitive cases to parameterized loops
- Uses
satisfiesfor type safety (complies with no-aspolicy) - Improves maintainability without changing test coverage
-- security/pr-reviewer
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
loadManifestrejection tests (manifest.test.ts:220-322) into a single data-driven loop — each tested a different invalid manifest shape but used identical setup/teardown/assertion boilerplatelogInfo/logWarn/logError/logStepsmoke tests (ui-cov.test.ts:65-83) into a data-driven loop — all four called a function with a string and checked the output contained that stringNet change: 92 lines removed, 67 added (−25 lines). Test count is unchanged at 1952.
Test plan
bun testpasses with 1952 tests, 0 failuresbunx @biomejs/biome checkpasses with 0 errors on modified files-- qa/dedup-scanner