Skip to content
mcp/skillhub

Agent Skill

JavaScript Testing Patterns skill

javascript-testing-patternswshobson/agentsplugins/javascript-typescript/skills/javascript-testing-patterns/SKILL.md

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.

42kMIT

always on

63 tokname + description

once used

3,469 tokSKILL.md body

bundled files

113 KB

repo stars

42kGitHub

Install the JavaScript Testing Patterns skill

Skills CLI (Claude Code, Codex, Cursor and others)

npx skills add https://github.com/wshobson/agents --skill javascript-testing-patterns

Claude Code, by hand (all projects)

git clone --depth 1 https://github.com/wshobson/agents.git /tmp/agents
mkdir -p ~/.claude/skills
cp -R /tmp/agents/plugins/javascript-typescript/skills/javascript-testing-patterns ~/.claude/skills/javascript-testing-patterns

For one project only, copy the folder into .claude/skills/ in that project instead. The agent picks it up when a task matches its description.

What it costs your context

Agent Skills load in three steps. Tokens counted with the o200k tokenizer; your model's count will differ a little.

WhenWhat loadsCost
Every sessionName and description63 tok
When the agent uses itThe SKILL.md instructions3,469 tok
Only if opened1 bundled files (13 KB)varies

Until it is used, javascript-testing-patterns costs about 22× less than the median MCP server we measured (1,362 tokens on every turn). Installing all 150 skills from wshobson/agents would load 7,688 tokens of descriptions. Skills vs MCP study

Checks

  • The instructions are over 500 lines; the specification suggests moving detail into reference files.

Checked 2026-10-22 · method

What's inside

The headings of its SKILL.md. Read the full file on GitHub.

  • JavaScript Testing Patterns
  • When to Use This Skill
  • Testing Frameworks
  • Jest - Full-Featured Testing Framework
  • Vitest - Fast, Vite-Native Testing
  • Unit Testing Patterns
  • Pattern 1: Testing Pure Functions
  • Pattern 2: Testing Classes
  • Pattern 3: Testing Async Functions
  • Mocking Patterns
  • Pattern 1: Mocking Modules
  • Pattern 2: Dependency Injection for Testing
  • Pattern 3: Spying on Functions
  • Integration Testing
  • Frontend Testing with Testing Library
  • Test Fixtures and Factories
  • Best Practices

More skills from wshobson/agents

All skills in this repo
  1. Master TypeScript's advanced type system including generics, conditional types, mapped types, template literals, and utility types for building type-safe applications. Use when implementing complex type logic, creating reusable type utilities, or ensuring compile-time type safety in TypeScript projects.

    91k57 tok idle · 1,998 in use
  2. tailwind-design-systemwshobson/agents

    Build scalable design systems with Tailwind CSS v4, design tokens, component libraries, and responsive patterns. Use when creating component libraries, implementing design systems, or standardizing UI patterns.

    70k42 tok idle · 1,508 in use
  3. airflow-dag-patternswshobson/agents

    Build production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.

    42k42 tok idle · 713 in use
  4. angular-migrationwshobson/agents

    Migrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.

    42k42 tok idle · 1,622 in use
  5. Understand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.

    42k66 tok idle · 753 in use
  6. api-design-principleswshobson/agents

    Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

    42k144 tok idle · 762 in use
  7. Write and maintain Architecture Decision Records (ADRs) following best practices for technical decision documentation. Use when documenting significant technical decisions, reviewing past architectural choices, or establishing decision processes.

    42k41 tok idle · 1,101 in use
  8. architecture-patternswshobson/agents

    Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.

    42k65 tok idle · 1,558 in use