vitest-prisma-dual-query-mocking
CommunityReliable dual Prisma query mocks in Vitest.
AuthorHankanman
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill enables reliable testing of code that uses both findFirst and findUnique on the same Prisma/ZenStack model by providing robust mocking patterns in Vitest.
Core Features & Use Cases
- Separate mocks per method: define distinct fake data for findFirst and findUnique to prevent undefined results.
- Conditional mocking: route responses based on query structure or parameters to cover all query variants.
- Compatibility with Vitest and Prisma/ZenStack: works with typical test suites that exercise both query methods in a single test.
Quick Start
Use this skill to set up dual-query mocks in a Vitest test that invokes both findFirst and findUnique on the same model.
Dependency Matrix
Required Modules
None requiredComponents
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: vitest-prisma-dual-query-mocking Download link: https://github.com/Hankanman/claude-config/archive/main.zip#vitest-prisma-dual-query-mocking Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.