dart-mocktail

Community

Simplify Dart/Flutter mocking with Mocktail.

Authorreloveution
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill streamlines the process of creating and managing mock objects in Dart and Flutter projects, reducing boilerplate code and preventing common testing errors like MissingStubError.

Core Features & Use Cases

  • Mock Creation: Easily generate mock classes for interfaces or abstract classes.
  • Fallback Values: Register default values for custom types to avoid errors with matchers.
  • Stubbing & Verification: Define expected behavior for mock methods and verify interactions.
  • Use Case: When testing a service that depends on a repository, use Mocktail to create a mock repository, stub its methods to return predictable data, and verify that the service calls the repository correctly.

Quick Start

Use the dart-mocktail skill to set up fallback values for MyDomainType and stub the fetchData method on MockIRepository to return a predefined list.

Dependency Matrix

Required Modules

None required

Components

references

💻 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: dart-mocktail
Download link: https://github.com/reloveution/dart-flutter-rules/archive/main.zip#dart-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.