mock-generator

Community

Generate test mocks, fast and flawless.

AuthorDexploarer
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Writing effective test mocks, stubs, and fixtures is crucial for isolated, fast, and reliable tests, but it can be repetitive and error-prone. This Skill automates the creation of these test doubles, saving development time and improving test quality.

Core Features & Use Cases

  • Multi-Framework Support: Generates mocks for popular JavaScript/TypeScript frameworks (Jest, Vitest) and Python (unittest.mock, pytest).
  • Diverse Mock Types: Supports mocking functions, classes, modules, API responses (with MSW), databases (Prisma, MongoDB), and React components/hooks.
  • Use Case: "Create a Jest mock for the fetchUser function that returns a specific user object on success and throws an error on failure."

Quick Start

Generate a Jest mock for the getUserProfile function that returns { id: 1, name: 'Alice' }.

Dependency Matrix

Required Modules

jestvitestmswfaker-jsjest-mock-extendedmongodb-memory-server@prisma/clientchaiethershardhat@testing-library/react@testing-library/jest-domreact

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: mock-generator
Download link: https://github.com/Dexploarer/claudius-skills/archive/main.zip#mock-generator

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.