mocktail

Community

Mock Dart tests without codegen, with confidence.

Authorevanca
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Mocking Flutter/Dart tests often requires code generation or heavy boilerplate. Mocktail provides a no-codegen approach and guides when to use mocks, fakes, or real objects to keep tests fast and readable.

Core Features & Use Cases

  • Mocking without code generation: Use Mocktail's noSuchMethod-based mocks to verify interactions and stub responses.
  • Fallback values: Register fallback values for non-nullable custom types used with argument matchers.
  • Stubbing & verification: Stub methods with when/thenReturn/thenAnswer and verify interactions using verify/verifyNever/called(n).
  • Argument matchers: Use any, captureAny, and other matchers to flexibly assert calls.

Quick Start

Create mocks by extending Mock and implementing your service, then stub methods with when and thenReturn and verify interactions.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: mocktail
Download link: https://github.com/evanca/flutter-ai-rules/archive/main.zip#mocktail

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.