skills/danielpodolsky/testing-fundamentals/SKILL.md
Auto-invoke when reviewing test files or discussing testing strategy. Enforces testing pyramid, strategic coverage, and stack-appropriate frameworks.
npx skillsauth add aiskillstore/marketplace testing-fundamentalsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"If you can't test it, you don't understand it. Tests are proof of understanding."
Activate this skill when:
▲
╱ ╲ E2E (10%)
╱ ╲ Playwright - Full user flows
╱─────╲
╱ ╲ Integration (20%)
╱ ╲ Vitest + RTL - Component interactions
╱───────────╲
╱ ╲ Unit (70%)
╱ ╲ Vitest - Functions, utils, logic
─────────────────
| Stack | Unit/Integration | E2E | |-------|------------------|-----| | Vite + React | Vitest + React Testing Library | Playwright | | Create React App | Jest + RTL | Playwright | | Next.js | Vitest or Jest + RTL | Playwright | | Node.js | Vitest (native ESM) | - | | Python | pytest | - | | Go | go test | - |
Why Vitest for Vite?
// ❌ BAD: Testing internal state
expect(component.state.isLoading).toBe(true);
// ✅ GOOD: Testing what user sees
expect(screen.getByText('Loading...')).toBeInTheDocument();
// ❌ BAD: Mock everything
jest.mock('./utils');
jest.mock('./api');
jest.mock('./hooks');
// What are you even testing at this point?
// ✅ GOOD: Mock only external boundaries
vi.mock('./api'); // Mock the API, test the rest
// ❌ BAD: Testing that React Query works
expect(useQuery).toHaveBeenCalledWith('users');
// ✅ GOOD: Testing YOUR code's behavior
await waitFor(() => {
expect(screen.getByText('User Name')).toBeInTheDocument();
});
// ❌ BAD: Breaks if you change CSS
screen.getByClassName('btn-primary-large-blue');
// ✅ GOOD: Semantic and stable
screen.getByRole('button', { name: 'Submit' });
// ❌ BAD: 100% coverage goal
// Results in tests that exist just for coverage
// ✅ GOOD: Strategic coverage
// Test critical paths, edge cases, complex logic
Ask these instead of giving answers:
describe('LoginForm', () => {
it('shows error when password is too short', async () => {
// Arrange
render(<LoginForm />);
// Act
await userEvent.type(screen.getByLabelText('Password'), '123');
await userEvent.click(screen.getByRole('button', { name: 'Login' }));
// Assert
expect(screen.getByText('Password must be at least 8 characters')).toBeInTheDocument();
});
});
| Flag | Question | |------|----------| | No tests for feature | "What tests prove this works?" | | Only happy path tested | "What if the API fails? What if input is empty?" | | Mocking everything | "What are you actually testing here?" | | Testing implementation | "Would this test break if you refactored but behavior stayed the same?" | | getByClassName usage | "Is there a more semantic way to select this element?" | | Large snapshot tests | "Will you actually review this diff when it changes?" |
Fetch: Vitest documentation
Fetch: React Testing Library queries
Fetch: Playwright best practices
Search: "vitest react testing library" in popular repos
Search: "playwright e2e test login" for E2E patterns
// Pattern: it('should [expected behavior] when [condition]')
it('should display error message when password is invalid')
it('should redirect to dashboard when login succeeds')
it('should disable submit button when form is submitting')
"I implemented comprehensive testing with 85% coverage focusing on critical user flows. I used Vitest for unit tests, React Testing Library for component integration tests, and Playwright for E2E tests covering login, checkout, and payment flows."
Tests are interview talking points. Every test you write is proof you understand the code.
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.