test sweep: cover src/git/client.dart (T-91)
test / unit + widget + golden + a11y (push) Failing after 29s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m0s
test / unit + widget + golden + a11y (push) Failing after 29s
test / integration_test (xvfb) (push) Has been skipped
test / bundle smoke (xvfb 5s) (push) Has been skipped
test / daemon subprocess + web WASM smoke (push) Has been skipped
test / dart doc (lib API) (push) Failing after 1m0s
23 integration tests in test/git/client_test.dart driving a real git binary against per-test sandbox repos. Covers every GitClient public method that wasn't already exercised through the daemon command suite: - Queries: status (clean + with upstream tracking ahead/behind), diff with explicit paths, log, currentBranch, branches (with the current-marker check), repoRoot (in-repo + non-repo paths). - Mutations: unstage with paths, commit-returns-hash, discard, discard with empty list, stash + stashPop with includeUntracked, checkout, stageHunk + unstageHunk via _applyPatch. - Error surface: mutations throw GitException on non-zero exit, _applyPatch surfaces stderr from a bad patch, bad git binary path → ProcessException → GitException, queries return empty fallbacks on a non-git workDir. - parseLog standalone parser: empty input, short-record skip, full record with body, 5-field record without body. Coverage: src/git/client.dart 76/141 -> 124/141 (88%). The remaining 17 lines are the pull / push paths (would need a real remote with matching credentials — out of scope) and the status GitException catch branches that require an in-flight git process failure mid-call. Total coverage 75.42% -> 76.04%; floor bumped to 76. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -18,7 +18,7 @@ repository: https://github.com/postmeridiem/clide
|
||||
|
||||
# Pre-push line-coverage floor. Ratchets up only — see D-66.
|
||||
# Reading: `awk -F: '/^coverage_floor:/ {gsub(/ /,"",$2); print $2}' pubspec.yaml`.
|
||||
coverage_floor: 75
|
||||
coverage_floor: 76
|
||||
|
||||
# Project metadata (was project.yaml, folded in per D-056).
|
||||
# version: above is the single source of truth. The Makefile reads
|
||||
|
||||
Reference in New Issue
Block a user