What problem does it solve?
Mocktail makes it easier to isolate Dart and Flutter code in tests when you need controllable stand-ins for services, repositories, events, or other collaborators. It helps you choose between real objects, lightweight fakes, and verifiable mocks without relying on code generation.
Core Features & Use Cases
- Mock, fake, or real guidance: Pick the simplest test double that fits your scenario.
- Fallback values and argument matching: Register custom placeholders so matchers can work with non-nullable types.
- Stubbing and verification: Define return values, async answers, errors, and interaction checks for the calls that matter.
- Use case: When testing a booking flow, mock the payment gateway, fake simple domain objects, and verify that the reservation service was called with the expected seat data.
Quick Start
Use the mocktail skill to create the needed test double, register any custom fallback values, stub the expected calls, and verify the interactions in your Dart or Flutter test.