test

Generate Vitest unit and component tests for functions, React components, and hooks.

1|Updated Feb 5, 2026
One-click install
npx skills add https://github.com/aditya30103/ContentDeck --skill test-aditya30103
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test
Source: https://github.com/aditya30103/ContentDeck/tree/main/.claude/skills/test
Command: npx skills add https://github.com/aditya30103/ContentDeck --skill test-aditya30103

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill automates the creation of comprehensive unit and component tests for your codebase, ensuring code quality and preventing regressions.

Core Features & Use Cases

  • Unit Testing: Generates tests for pure functions in src/lib/.
  • Component Testing: Creates tests for React components, including user interactions and state changes.
  • Mocking: Provides patterns for mocking contexts, hooks, and external APIs.
  • Use Case: After adding a new utility function, use this skill to quickly generate its unit tests, verifying its behavior with various inputs and edge cases.

Quick Start

Use the test skill to write unit tests for the new detectPodcast function in utils.ts.

Frequently Asked Questions about test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Vitest unit tests for pure functions in my codebase?

To generate Vitest component tests for React, the Skill creates tests covering user interactions and state changes within your components. It ensures code quality by automating comprehensive component test creation based on your established codebase patterns.

What is the best way to mock external APIs and contexts in Vitest?

The best way to mock external APIs and contexts in Vitest is to use the specific mocking patterns provided by this Skill. It generates test setups that successfully mock contexts, auth, and external APIs, allowing you to isolate components and hooks during testing.

Does this Vitest generator work with React hooks testing?

Yes, this Vitest generator works with React hooks testing by creating component tests that cover state changes and interactions. It provides specific guidance on testing strategies and patterns for hooks, including mocking their required contexts.

Can I use this to write tests for a newly added utility function?

Yes, you can use this to write tests for a newly added utility function by pointing the Skill at the file, such as `utils.ts`. It quickly generates Vitest unit tests that verify the function's behavior across various inputs and edge cases.