test: achieve 97% coverage and remove avatar feature#10
Merged
Conversation
- Add comprehensive tests across all packages to raise coverage from 75.9% to 97.4% (remaining 2.6% is structurally unreachable dead code) - Add codecov.yml to exclude auto-generated cmd/generated/ and main.go from coverage reporting (18K lines dragging Codecov to 17.95%) - Remove internal/avatar package and cf avatar command (unused feature) - Remove avatar docs and sidebar entry Package coverage: audit 100%, cache 100%, config 100%, diff 100%, duration 100%, errors 100%, jq 100%, jsonutil 100%, policy 100%, gen 100%, client 95.9%, oauth2 97.7%, template 98.9%, gendocs 97.3%, cmd 79.0%
Already in .gitignore but was still tracked. Files remain on disk.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
TestOpenBrowserCurrentOS was calling the real openBrowser() which runs `open https://example.com` on macOS, launching the user's browser. Mock the function instead.
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.
Summary
codecov.ymlto exclude auto-generatedcmd/generated/(18K lines) andmain.gofrom Codecov reporting — previous Codecov score was 17.95% due to theseinternal/avatarpackage andcf avatarcommand (unused writing style profiler feature)Coverage by package
Test plan
go test ./...)cf avatarcommand no longer appears in help output