/quality-tools:typescript-component-testingfrom quality-tools
Jest, Vitest, and React Testing Library patterns for component testing. PROACTIVELY activate for: (1) Writing React component tests, (2) Using Testing Library queries, (3) Testing user interactions, (4) Async component testing, (5) Accessibility-focused testing. Triggers: "jest", "vitest", "testing-library", "react test", "component test", "render", "screen", "userEvent"
Ships in quality-tools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Keywords: jest, vitest, testing-library, react, component test, render
File Patterns: *.test.tsx, *.spec.ts, *.test.js
Modes: testing_frontend
Core Principle: Test from user's perspective, not implementation
getByRole (accessible roles)getByLabelText (form elements)getByPlaceholderTextgetByTextgetByTestId (last resort)import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
test('submits login form', async () => {
const handleSubmit = jest.fn();
render(<LoginForm onSubmit={handleSubmit} />);
await userEvent.type(screen.getByLabelText(/email/i), '[email protected]');
await userEvent.type(screen.getByLabelText(/password/i), 'password123');
await userEvent.click(screen.getByRole('button', { name: /log in/i }));
expect(handleSubmit).toHaveBeenCalledWith({
email: '[email protected]',
password: 'password123'
});
});
test('loads and displays data', async () => {
render(<UserProfile userId="123" />);
// Wait for data to load
expect(await screen.findByText('John Doe')).toBeInTheDocument();
});
// Or with waitFor
await waitFor(() => {
expect(screen.getByText('John Doe')).toBeInTheDocument();
});
// Preferred: userEvent (realistic)
await userEvent.click(button);
await userEvent.type(input, 'text');
await userEvent.selectOptions(select, ['option1']);
// Avoid: fireEvent (low-level)
fireEvent.click(button);
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub agentient/vibekit --plugin quality-tools7 skills in this plugin
/advanced-js-mocking-patternsAdvanced mocking patterns for Jest and Vitest including module mocking, spies, and fake timers. PROACTIVELY activate for: (1) Module mocking, (2) Partial mocking with spies, (3) Mock lifecycle management, (4) Fake timers for time-dependent code, (5) Complex mock implementations. Triggers: "jest.mock", "vi.mock", "spyOn", "fakeTimers", "mockImplementation", "mockReturnValue", "mock lifecycle"
/python-code-review-and-lintingRuff linting rules, security patterns, mypy type checking, and Python code review best practices. PROACTIVELY activate for: (1) Setting up Ruff linting, (2) Fixing security vulnerabilities, (3) Resolving mypy type errors, (4) Code review for anti-patterns, (5) Python best practices enforcement. Triggers: "ruff", "lint", "refactor", "security", "anti-pattern", "python review", "mypy", "type error"
/python-testing-patternsPytest fixtures, parametrization, mocking, and test organization patterns. PROACTIVELY activate for: (1) Writing pytest test suites, (2) Creating fixtures, (3) Implementing parametrized tests, (4) Mocking external dependencies, (5) Organizing test directories. Triggers: "pytest", "fixture", "parametrize", "mock", "python test", "unittest", "conftest"
/qa-strategy-and-metricsTesting pyramid, quality metrics, and technical debt management strategies. PROACTIVELY activate for: (1) Designing testing strategy, (2) Evaluating code quality metrics, (3) Managing technical debt, (4) Analyzing test coverage approaches, (5) Calculating complexity. Triggers: "testing strategy", "testing pyramid", "quality metrics", "technical debt", "cyclomatic complexity", "maintainability", "coverage principles"
/test-coverage-analysisTest coverage analysis, gap identification, and coverage configuration for Python and JavaScript. PROACTIVELY activate for: (1) Analyzing coverage reports, (2) Identifying critical coverage gaps, (3) Configuring coverage tools, (4) Setting up CI/CD coverage checks, (5) Branch coverage analysis. Triggers: "coverage", "uncovered", "pytest-cov", "istanbul", "c8", "coverage report", "coverage gap"
/typescript-code-review-and-lintingESLint configuration, TypeScript type safety rules, and React-specific linting patterns. PROACTIVELY activate for: (1) Setting up ESLint for TypeScript, (2) Fixing type safety issues, (3) React-specific linting rules, (4) Resolving TypeScript compiler errors, (5) Code review for anti-patterns. Triggers: "eslint", "typescript", "type checking", "refactor", "ts review", "no-explicit-any", "ts-ignore"
Other plugins' skills for the same job