What problem does it solve?
This Skill guides developers in writing pragmatic, high-value tests for the Brokle platform, focusing on complex business logic rather than trivial framework behavior. It saves time by optimizing testing efforts.
Core Features & Use Cases
- Pragmatic Testing Philosophy: Clearly defines what to test (complex business logic, orchestration) and what to skip (simple CRUD, framework behavior).
- Service Layer Test Pattern: Provides a detailed, table-driven test pattern with mock repositories and assertion best practices for Go services.
- Integration Testing: Guides on setting up and running integration tests with real database dependencies for end-to-end verification.
- Use Case: A developer has implemented a new complex billing calculation service. This skill helps them design effective unit tests that mock repository interactions and verify the business logic, ensuring correctness without over-testing.
Quick Start
I need to write a unit test for a new billing service that calculates subscription costs. Provide the table-driven test pattern, including how to mock repository dependencies and verify results.