flutter-tdd

Installation
SKILL.md

When to Use

  • Starting implementation of any new feature (write test FIRST)
  • Testing domain entities and value objects
  • Testing use cases / application services
  • Testing Riverpod notifiers and providers
  • Creating mock implementations for repository interfaces
  • Testing infrastructure adapters (API clients, local storage)

Critical Patterns

Pattern Rule
Test FIRST Write the failing test before production code. Always.
Red -> Green -> Refactor Fail -> pass -> clean up. Never skip a step.
Mirror structure test/ mirrors lib/ exactly
File naming foo.dart -> foo_test.dart
Mocks via interfaces Domain repository interfaces ARE the mock boundary — no mockito needed for simple cases
No test pollution Each test is independent, no shared mutable state
Related skills
Installs
1
First Seen
Mar 13, 2026