test(checks): cover three untested edge cases in runChecks#14
Merged
protosphinx merged 1 commit intomainfrom May 3, 2026
Merged
test(checks): cover three untested edge cases in runChecks#14protosphinx merged 1 commit intomainfrom
protosphinx merged 1 commit intomainfrom
Conversation
Add tests for: - empty mcpServers set: mcp-server-unknown is skipped when no settings.json is present (the config.mcpServers.size > 0 guard) - description-collision negative path: Jaccard below 0.6 does not fire the collision diagnostic - name-drift directory match: name matching dirBase passes the check even when the filename differs
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.
Why
src/checks.tshas three code paths that had no test coverage. Theconfig.mcpServers.size > 0guard (documented in the README as "if neither settings.json exists, MCP server warnings are skipped") was exercised only indirectly. Thedescription-collisionnegative path (Jaccard below 0.6) and the directory-name branch ofname-driftwere also absent from the suite.What
skips mcp-server-unknown when mcpServers set is empty- verifies thesize > 0guard prevents a false positive on fresh checkouts with no settings.jsondoes not fire description-collision when Jaccard is below threshold- negative path for the Jaccard collision detectordoes not flag name-drift when name matches the directory- thedirBasebranch of the name-drift OR conditionTests
test/checks.test.ts(+37 lines, 0 new dependencies)vitest runcleanSelf-merge gate
Generated by Claude Code