test sweep: cover kernel ProjectManager + RecentProject (T-91)
test / unit + widget + golden + a11y (push) Failing after 31s
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 1m3s
test / unit + widget + golden + a11y (push) Failing after 31s
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 1m3s
18 tests in test/kernel/src/project_test.dart driving ProjectManager with an injected onValidateProject hook so the manager doesn't shell out to git in tests. Covers: - RecentProject: relativePath HOME collapsing, timeAgo bucketing (minutes / hours / yesterday / days / weeks / months), toJson / fromJson round-trip, fromJson tolerance for missing fields. - ProjectManager.open: non-git path (returns false), valid path (sets current, emits ProjectOpened, registers in recents), re-open deduplication, recents capped at 10. - ProjectManager.close: resets current, emits ProjectClosed, no-op when already closed. - ProjectManager.loadRecents: happy path, malformed-value tolerance, no-setting clears to empty. - ProjectManager.openLast: no-stored, stored-but-missing, stored-and-exists. - ProjectManager.resolveProject without injected validator falls back to Process.run. Coverage: kernel/src/project.dart 2/72 -> 66/72 (92%). Remaining 6 lines are the _currentBranch helper + ProjectOpened-event-time branch shake (need a real git in the sandbox to materialise the branch). Total coverage 81.64% -> 82.42%; floor bumped to 82. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
Reference in New Issue
Block a user