test(config): cover Git skill source with no local_path diagnostic#12
Merged
Conversation
Adds a single unit test in src-tauri/src/config/mod.rs covering the "Source has no local path yet" diagnostic branch in discover_skills_with_diagnostics. This was the only remaining uncovered branch flagged in the PR #11 review (minor finding). The test builds a ClaiConfig with one enabled Git skill source whose local_path is None (the state right after the user adds a Git source but before the clone completes) and asserts the resulting diagnostic has ok == false and message contains "no local path yet".
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.
Follow-up to PR #11 review (minor finding).
What
Adds one unit test in
src-tauri/src/config/mod.rscovering the diagnostic branch indiscover_skills_with_diagnosticsthat fires when an enabled Git skill source haslocal_path == None.Test name:
discover_skills_emits_no_local_path_diagnostic_for_git_sourceWhy
PR #11 review flagged this as the only uncovered diagnostic branch in
discover_skills_with_diagnostics. Severity was minor — did not block PR #11 — so it was carved out into a follow-up.Coverage delta
config/mod.rs: 23 → 24 tests.cargo test --libtotal: 323 → 324 passing.Validation
cargo fmt --check✅cargo clippy -- -D warnings(lib only, matches CI) ✅cargo test --lib→ 324 passing, 1 ignorednpm run lint→ 0 errors (46 pre-existing warnings, unchanged)Scope
Test-only change. Production code untouched. +24 lines, single file.