test: add GitHubOAuthService and FrontmatterEditor coverage (+26)#73
test: add GitHubOAuthService and FrontmatterEditor coverage (+26)#73corvid-agent wants to merge 1 commit intomainfrom
Conversation
Add 26 new tests covering two previously untested modules: - GitHubOAuthService (14 tests): localStorage restore/corrupt JSON, cancelFlow, signOut, full device flow success, access_denied, expired_token, 3-strike consecutive failures (HTTP + network), unknown error with error_description, non-fatal profile fetch failure - FrontmatterEditorComponent (12 tests): availableModules computed filtering (excludes current module + existing deps), addFile/addTable/ addDependency with empty-input guard, removeFile/removeDependency by index, onFieldChange via DOM input, immutability of original frontmatter Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Review: LGTM ✓ Solid test coverage for two previously untested components. FrontmatterEditor (13 tests): Good use of the test host component pattern. The GitHubOAuthService (13 tests): Thorough coverage of the device flow state machine. The No issues found. Ready to merge. |
Summary
GitHubOAuthService (14 tests): First test coverage for the OAuth device flow service. Covers localStorage restore with corrupt JSON,
cancelFlow/signOutstate resets, full device flow success path, error branches (access_denied,expired_token, unknown error witherror_description), 3-strike consecutive failure handling (both HTTP 502 and network errors), and non-fatal user profile fetch failure.FrontmatterEditorComponent (12 tests): First test coverage for the frontmatter editor. Covers the
availableModulescomputed signal (excludes current module and already-added deps),addFile/addTable/addDependencywith empty-input guards,removeFile/removeDependencyby index,onFieldChangevia DOM input events, and immutability verification (original frontmatter unchanged after add).Total suite: 409 tests passing (up from 383).
Test plan
ng test --no-watch)🤖 Generated with Claude Code