Skip to content

test(config): cover Git skill source with no local_path diagnostic#12

Merged
juacker merged 1 commit into
mainfrom
qa/config-no-local-path-test
May 21, 2026
Merged

test(config): cover Git skill source with no local_path diagnostic#12
juacker merged 1 commit into
mainfrom
qa/config-no-local-path-test

Conversation

@juacker
Copy link
Copy Markdown
Owner

@juacker juacker commented May 21, 2026

Follow-up to PR #11 review (minor finding).

What

Adds one unit test in src-tauri/src/config/mod.rs covering the diagnostic branch in discover_skills_with_diagnostics that fires when an enabled Git skill source has local_path == None.

Test name: discover_skills_emits_no_local_path_diagnostic_for_git_source

Why

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 --lib total: 323 → 324 passing.

Validation

  • cargo fmt --check
  • cargo clippy -- -D warnings (lib only, matches CI) ✅
  • cargo test --lib324 passing, 1 ignored
  • npm run lint → 0 errors (46 pre-existing warnings, unchanged)

Scope

Test-only change. Production code untouched. +24 lines, single file.

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".
@juacker juacker marked this pull request as ready for review May 21, 2026 21:59
@juacker juacker merged commit 586c68c into main May 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant