[PM-33573] llm: Add testing-ios-code skill with examples and references#2447
[PM-33573] llm: Add testing-ios-code skill with examples and references#2447SaintPatrck wants to merge 1 commit intomainfrom
Conversation
- SKILL.md: test type decision table, setup pattern with BitwardenTestCase and ServiceContainer.withMocks, naming convention, co-location rule, mock generation reference; references Docs/Testing.md as authoritative - examples/processor-test-example.md: full processor test with setUp/tearDown, action test (state mutation), effect test (async), error path test - examples/coordinator-test-example.md: MockStackNavigator, route assertions, action.type and action.view verification, child coordinator start check - examples/view-test-example.md: MockProcessor, ViewInspector button/toggle tests, dispatchedActions vs effects, snapshot test with disabletest_ prefix - examples/service-test-example.md: DefaultXxx with direct mock injection, success/error/side-effect tests, assertAsyncThrows pattern - references/testing-gotchas.md: disabletest_ prefix, simulator requirements, BitwardenTestError, randomized execution order, @mainactor requirement - references/mock-generation.md: AutoMockable annotation, Sourcery commands, generated file locations, ServiceContainer.withMocks pattern - CLAUDE.md: update Testing section to pointer + correct disabletest_ prefix
|
Great job! No new security vulnerabilities introduced in this pull request |
|
Claude finished @SaintPatrck's task in 5m 16s —— View job I'll analyze this and get back to you. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2447 +/- ##
==========================================
- Coverage 86.86% 85.72% -1.15%
==========================================
Files 1841 2074 +233
Lines 162244 177135 +14891
==========================================
+ Hits 140941 151843 +10902
- Misses 21303 25292 +3989 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
test |
|
Overall Assessment: APPROVE Reviewed the new testing-ios-code skill (SKILL.md, 4 examples, 2 references) and the CLAUDE.md update. The skill is well-structured with accurate examples that match real codebase patterns verified against actual test files (LandingProcessorTests.swift, AuthCoordinatorTests.swift, LandingView+ViewInspectorTests.swift). The CLAUDE.md fix correcting the snapshot prefix from disable to disabletest_ is accurate. Code Review Details
|

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-33573
📔 Objective
Adds a Claude skill for writing tests in Bitwarden iOS, with concrete examples derived from real codebase test files.
What changed:
skills/testing-ios-code/SKILL.md— Decision table for choosing test type (processor/coordinator/view/snapshot/service), setup pattern usingBitwardenTestCase+ServiceContainer.withMocks, naming convention (test_functionName_behavior), co-location rule, and mock generation reference. Defers toDocs/Testing.mdas authoritative.examples/— Four concrete examples based on actual codebase test files: processor tests (action/effect/error paths with@MainActor), coordinator tests (MockStackNavigator, route/view assertions), view tests (ViewInspector interactions +disabletest_snapshot prefix), service tests (direct mock injection,assertAsyncThrows).references/testing-gotchas.md— Non-obvious facts:disabletest_prefix (not justdisable), simulator device/OS requirements,BitwardenTestError, randomized test execution order,@MainActorrequirement on async processor tests.references/mock-generation.md— SourceryAutoMockableworkflow: annotation, manual trigger commands, generated file locations,ServiceContainer.withMockspattern.CLAUDE.md — Updates the Testing section from a verbose directive to a concise pointer to
Docs/Testing.md+testing-ios-codeskill. Also corrects the snapshot prefix fromdisabletodisabletest_.