add-test-whatifwedigdeeper-application-tracker
Add unit tests for a component or function
Best use case
add-test-whatifwedigdeeper-application-tracker is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Add unit tests for a component or function
Teams using add-test-whatifwedigdeeper-application-tracker should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/add-test-whatifwedigdeeper-application-tracker/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How add-test-whatifwedigdeeper-application-tracker Compares
| Feature / Agent | add-test-whatifwedigdeeper-application-tracker | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Add unit tests for a component or function
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Add Tests: $ARGUMENTS
Create comprehensive unit tests for the specified component or function.
## Process
### 1. Locate Source File
Search in order:
- `components/$ARGUMENTS.tsx` (React component)
- `lib/$ARGUMENTS.ts` (utility function)
- `app/$ARGUMENTS.tsx` (page component)
### 2. Analyze Source
Read the file to identify:
- Exported functions/components
- Props interfaces
- State management
- Event handlers
- Key functionality to test
### 3. Create Test File
Place test adjacent to source: `[name].test.tsx` or `[name].test.ts`
### 4. Generate Tests
**For React components:**
```typescript
import { render, screen, fireEvent } from '@testing-library/react';
import ComponentName from './ComponentName';
describe('ComponentName', () => {
test('renders correctly', () => {
render(<ComponentName />);
expect(screen.getByTestId('component-name')).toBeInTheDocument();
});
test('handles user interaction', () => {
render(<ComponentName />);
fireEvent.click(screen.getByRole('button'));
// assert expected behavior
});
test('handles empty state', () => { /* ... */ });
test('handles error state', () => { /* ... */ });
});
```
**For utility functions:**
```typescript
import { functionName } from './fileName';
describe('functionName', () => {
test('returns expected output', () => {
expect(functionName(input)).toBe(expected);
});
test('handles empty input', () => { /* ... */ });
test('handles edge cases', () => { /* ... */ });
test('throws on invalid input', () => {
expect(() => functionName(invalid)).toThrow();
});
});
```
### 5. Run Tests
```bash
npm test -- $ARGUMENTS.test
```
Fix any failures, then report results.
## Coverage Requirements
- Happy path scenarios
- Edge cases (empty, null, boundary values)
- Error states
- User interactions (for components)
- Accessibility (keyboard navigation)
## Best Practices
- Use `data-testid` for stable selectors
- Mock localStorage if needed
- Tests should be independent and deterministic
- Descriptive test names that explain the scenarioRelated Skills
add-unit-tests
Guide for adding unit tests to AReaL. Use when user wants to add tests for new functionality or increase test coverage.
add-test
Add unit tests for component or function: $ARGUMENTS
add-test-coverage
Analyze recent changes and add test coverage for HEAD commit
add-hook-whatifwedigdeeper-application-tracker
Create a custom React hook with TypeScript and tests
add-backend-testing
Add backend integration testing with Vitest to an existing app. Sets up isolated test database schema and writes tests for tRPC routers.
add-api-route-whatifwedigdeeper-application-tracker
Create Next.js API route with validation and error handling
adb-device-testing
Use when testing Android apps on ADB-connected devices/emulators - UI automation, screenshots, location spoofing, navigation, app management. Triggers on ADB, emulator, Android testing, location mock, UI test, screenshot walkthrough.
act-local-testing
Use when testing GitHub Actions workflows locally with act. Covers act CLI usage, Docker configuration, debugging workflows, and troubleshooting common issues when running workflows on your local machine.
accessibility-testing
WCAG 2.2 compliance testing, screen reader validation, and inclusive design verification. Use when ensuring legal compliance (ADA, Section 508), testing for disabilities, or building accessible applications for 1 billion disabled users globally.
accessibility-tester
Expert accessibility tester specializing in WCAG compliance, inclusive design, and universal access. Masters screen reader compatibility, keyboard navigation, and assistive technology integration with focus on creating barrier-free digital experiences.
accessibility-test-axe
Эксперт по a11y тестированию. Используй для axe-core, automated testing и accessibility audits.
acceptance-testing
Plan and (when feasible) implement or execute user acceptance tests (UAT) / end-to-end acceptance scenarios. Converts requirements or user stories into acceptance criteria, test cases, test data, and a sign-off checklist; suggests automation (Playwright/Cypress for web, golden/snapshot tests for CLIs/APIs). Use when validating user-visible behavior for a release, or mapping requirements to acceptance coverage.