Repository navigation
Conversation
Add tests/common/mod.rs so integration tests preserve LLVM_PROFILE_FILE across env_clear() instead of dropping subprocess coverage profiles, remove duplicate and prose-grep tests, replace vacuous or bypassing unit tests with boundary assertions, and add unit and integration tests across core modules and commands. Coverage (cargo llvm-cov --summary-only): 91.32% regions, 93.97% functions, 96.04% lines.
Add in-process command error-propagation and edge-branch tests in tests/error_paths.rs, extract pure seams for interactive confirmation, browser launch, update notifications, response size limits, browser lookup, and panic formatting so those paths are tested deterministically, remove redundant error-mapping closures in inspect, and cover remaining unit edge cases across client, config, auth, provenance, search, and resource commands. Coverage (cargo llvm-cov --summary-only): 95.27% regions, 97.58% functions, 97.96% lines.
Skip appending ", used by: 0 page(s): " when a sidebar's used_by array is empty (and drop the trailing colon when used_by_count is non-zero with no listed slugs), with unit tests for sidebar_heading.
…nd key names - sources::why_refused finds the config file with config_path_in_use(), which does not move a legacy ~/.config/realgeeks, so checking which files may be sent (and the tests that do it) never renames a real config dir - the sidebar heading uses the larger of used_by_count and the used_by list, so a stale 0 or a missing list no longer hides pages using it - the default key name skips an empty HOSTNAME/COMPUTERNAME instead of falling through to "unknown host" - the rename-failure test uses a dangling symlink, not a read-only dir, so it also fails the rename when run as root Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…checks - browser login tests bind port 0 and learn the real port from the start request, instead of probing a free port and rebinding it - the page-1 rate-limit mock matches the exact query and expects one hit - the multi-section guide test checks the blank line between sections - restore the area-pages, pages update and guide fonts help assertions dropped in the refactor Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
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.
Raises test coverage from ~81% to ~98% of lines, mostly with new tests. Shipped behaviour changes are small and listed below.
Behaviour changes (review these closely)
used_by_countand theused_bylist, and omits it when both are empty.sourcesfinds the config file without migrating a legacy~/.config/realgeeks, so checking a path never renames anything (config_path_in_use).HOSTNAME/COMPUTERNAMEinstead of saying "unknown host".confirm_prompt,login_with,notify_with,read_limited_to,find_browser_with,format_panic,update::release_target_for.Tests (skim)
tests/error_paths.rs: 500/422/404 propagation, missing ids, usage errors for every resource command.else { return; },unwrap_or_default()).pages update,guide fonts) are kept in one test.tests/commonkeepsLLVM_PROFILE_FILE, socargo llvm-covcounts subprocess runs.Coverage (
cargo llvm-cov --summary-only)Verification
cargo fmt --check,cargo clippy --all-targets -D warningsandcargo test(335 passed) all pass. The coverage figures were measured before the last two commits.Merge note: conflicts with #114 and #115, mostly in the test files they also touch. Land those first, then rebase this.
🤖 Generated with Claude Code