Skip to content
Back to skills

Testing Kprsnt2

ASecurity

Testing patterns and best practices for unit, integration, and E2E testing.

  • 57 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 17, 2026
testingtestingapidatabase

Works with

  • api

Security analysis

A100/100

Scanned October 17, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill testing-kprsnt2 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Testing Kprsnt2?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Testing Kprsnt2
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-testing-kprsnt2/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-testing-kprsnt2)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: testing
description: Testing patterns and best practices for unit, integration, and E2E testing.
globs: ["**/*.test.js", "**/*.spec.js", "**/*.test.ts", "**/*.spec.ts", "**/test/**", "**/tests/**", "**/__tests__/**", "**/jest.config.*", "**/vitest.config.*", "**/playwright.config.*", "**/cypress.config.*"]
priority: 85
tags: ["workflow"]
---

# Testing Best Practices

## Test Structure (AAA Pattern)
- Arrange: Set up test data and conditions
- Act: Execute the code under test
- Assert: Verify the expected outcome
- Use descriptive test names: "should X when Y"

## Unit Tests
- Test one behavior per test
- Mock external dependencies
- Test edge cases and error paths
- Keep tests fast (< 100ms each)
- Use factories for test data
- Aim for 80%+ coverage

## Integration Tests
- Test component interactions
- Use test database/containers
- Clean up after tests
- Test happy and error paths
- Use realistic data

## E2E Tests
- Test critical user flows only
- Keep tests independent
- Use stable selectors (data-testid)
- Handle async properly
- Run in CI with retries

## Mocking
- Mock at boundaries (APIs, DB)
- Use factories for test data
- Don't over-mock (test real behavior)
- Reset mocks between tests
- Prefer fakes over mocks when possible

## Tools
- Jest/Vitest for unit tests
- Playwright/Cypress for E2E
- MSW for API mocking
- Faker for test data
- Testing Library for component tests

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.