Vitest configuration, mocking, coverage, snapshot testing, and performance.
Creates and configures Vitest unit tests with mocking, coverage, and performance optimization.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdExpert assistance for unit and integration testing with Vitest.
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { render, screen } from '@testing-library/react';
import { UserService } from './user.service';
describe('UserService', () => {
const mockDb = { user: { findMany: vi.fn() } };
beforeEach(() => {
vi.clearAllMocks();
});
it('should fetch users', async () => {
mockDb.user.findMany.mockResolvedValue([{ id: '1', name: 'John' }]);
const service = new UserService(mockDb);
const users = await service.findAll();
expect(users).toHaveLength(1);
expect(mockDb.user.findMany).toHaveBeenCalledOnce();
});
});
// vitest.config.ts
export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
coverage: {
provider: 'v8',
reporter: ['text', 'html'],
},
},
});
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.