vitest-mocking
✓Vitest mocking patterns and test double strategies. Use when writing tests that need mocks, spies, stubs, or fakes. Triggers include: mocking modules, stubbing globals (fetch, Date, timers), testing composables, mocking imports (default/named), creating test doubles, replacing dependencies, verifying mock calls, cleaning up mocks, or any question about "how do I mock X in Vitest". Also use when reviewing tests for proper mocking practices.
Installation
SKILL.md
| Spy | Record calls, verify interactions | No (uses real code) | | Mock | Replace module entirely | Yes | | Stub | Return canned responses | Yes | | Fake | Working but simplified impl | Yes |
Use spy when: Verifying a function was called correctly while keeping real behavior
Use mock when: Replacing external dependencies (network, database, third-party modules)
Vitest mocking patterns and test double strategies. Use when writing tests that need mocks, spies, stubs, or fakes. Triggers include: mocking modules, stubbing globals (fetch, Date, timers), testing composables, mocking imports (default/named), creating test doubles, replacing dependencies, verifying mock calls, cleaning up mocks, or any question about "how do I mock X in Vitest". Also use when reviewing tests for proper mocking practices. Source: alexanderop/workouttracker.
Facts (cite-ready)
Stable fields and commands for AI/search citations.
- Install command
npx skills add https://github.com/alexanderop/workouttracker --skill vitest-mocking- Category
- </>Dev Tools
- Verified
- ✓
- First Seen
- 2026-02-01
- Updated
- 2026-02-18
Quick answers
What is vitest-mocking?
Vitest mocking patterns and test double strategies. Use when writing tests that need mocks, spies, stubs, or fakes. Triggers include: mocking modules, stubbing globals (fetch, Date, timers), testing composables, mocking imports (default/named), creating test doubles, replacing dependencies, verifying mock calls, cleaning up mocks, or any question about "how do I mock X in Vitest". Also use when reviewing tests for proper mocking practices. Source: alexanderop/workouttracker.
How do I install vitest-mocking?
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/alexanderop/workouttracker --skill vitest-mocking Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Where is the source repository?
https://github.com/alexanderop/workouttracker
Details
- Category
- </>Dev Tools
- Source
- skills.sh
- First Seen
- 2026-02-01