Sign in
Explore
Skills · SkillTesting & SecurityUnit tests & TDDReviewed

javascript-testing-patterns

Testing strategies with Jest, Vitest and Testing Library, for unit, integration and end-to-end tests.

Kind
Skill
Works with
Claude Code, Codex
Languages
TypeScript / JavaScript
Source
wshobson/agents @ 0874a27b17a2
Path
plugins/javascript-typescript/skills/javascript-testing-patterns/SKILL.md
Jobs
Testing
Topics
Unit tests & TDD

Credit

Made by
wshobson
Original
github.com/wshobson/agents/blob/0874a27b17a22e2b7c2e2bcd72576…
License
MIT

Listed by Skill Manifest; not made by us.

InstallInstall it from a plugin marketplace.
/plugin install javascript-typescript@claude-code-workflows
Install factsScanned 3 Nov 2026
Adds
  • .claude/skills/javascript-testing-patterns/ (the skill folder)
  • 1 file(s) the skill refers to
  • 1 other file in the folder: references/advanced-testing-patterns.md
Runs scripts
None found
Uses the network
Yes
  • HTTP client calls
Needs secrets
Yes
  • SMTP_PASS
Reads environment variables
  • SMTP_HOST
  • SMTP_USER
  • SMTP_PASS
  • EMAIL_FROM
Calls other skills
  • /button
  • /form
Source revision
0874a27b17a2
Licence
MIT
Last activity
24 Nov 2026
Source changed after the scan
Yes
  • Last push 24 Nov 2026, scanned 3 Nov 2026; read it again before you rely on this scan
Review
Reviewed

Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.

# 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"],
};
…