Agent skill · Testing & QA

javascript-testing-patterns

Implement comprehensive testing strategies using Jest, Vitest, and Testing Library for unit tests, integration tests, and end-to-end testing with mocking, fixtures, and test-driven development. Use when writing JavaScript/TypeScript tests, setting up test infrastructure, or implementing TDD/BDD workflows.

Seth Hobson38,331★ · +219/wk · 1 repos on radarProfile →
claude-codecodexcopilotcursorMIT
Install
npx skills add wshobson/agents --skill javascript-testing-patterns --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 14 KB
Bundled scripts: none
Path: plugins/javascript-typescript/skills/javascript-testing-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 38,479 · +148 this week
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# JavaScript Testing Patterns Comprehensive guide for implementing robust testing strategies in JavaScript/TypeScript applications using modern testing frameworks and best practices. ## When to Use This Skill - Setting up test infrastructure for new projects - Writing unit tests for functions and classes - Creating integration tests for APIs and services - Implementing end-to-end tests for user flows - Mocking external dependencies and APIs - Testing React, Vue, or other frontend components - Implementing test-driven development (TDD) - Setting up continuous testing in CI/CD pipelines ## Testing Frameworks ### Jest - Full-Featured Testing Framework **Setup:** ```typescript // jest.config.ts import type { Config } from "jest"; const config: Config = { preset: "ts-jest", testEnvironment: "node", roots: ["<rootDir>/src"], testMatch: ["**/__tests__/**/*.ts", "**/?(*.)+(spec|test).ts"], collectCoverageFrom: [ "src/**/*.ts", "!src/**/*.d.ts", "!src/**/*.interface.ts", ], coverageThreshold: { global: { branches: 80, functions: 80, lines: 80, statements: 80, }, }, setupFilesAfterEnv: ["<rootDir>/src/test/setup.ts"], }; export default config; ``` ### Vitest - Fast, Vite-Native Testing **Set

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Testing Frameworks
  3. Jest - Full-Featured Testing Framework
  4. Vitest - Fast, Vite-Native Testing
  5. Unit Testing Patterns
  6. Pattern 1: Testing Pure Functions
  7. Pattern 2: Testing Classes
  8. Pattern 3: Testing Async Functions
  9. Mocking Patterns
  10. Pattern 1: Mocking Modules
  11. Pattern 2: Dependency Injection for Testing
  12. Pattern 3: Spying on Functions
  13. Integration Testing
  14. Frontend Testing with Testing Library
Ships with 1 file
  • references/advanced-testing-patterns.md
More from agents
All skills →
About this skill
What does the javascript-testing-patterns skill do?

Implement comprehensive testing strategies using Jest, Vitest, and Testing Library for unit tests, integration tests, and end-to-end testing with mocking, fixtures, and test-driven development. Use when writing JavaScript/TypeScript tests, setting up test infrastructure, or implementing TDD/BDD workflows.

How do I install it?

Run `npx skills add wshobson/agents --skill javascript-testing-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From wshobson/agents, a repository with 38,479 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going