跳转到主要内容
此内容尚未提供您的语言版本,正在以英文显示。

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.

目的

Implement robust testing strategies using Jest, Vitest, and Testing Library for JavaScript/TypeScript projects, ensuring code quality and reliability.

功能

  • Comprehensive Jest setup and patterns
  • Fast Vitest setup and patterns
  • Unit, integration, and E2E testing examples
  • Mocking techniques for modules and dependencies
  • Frontend component testing with Testing Library
  • Test fixtures and factories using Faker.js
  • Snapshot testing guidance

使用场景

  • Setting up test infrastructure for new projects
  • Writing unit tests for functions and classes
  • Implementing integration tests for APIs and services
  • Creating end-to-end tests for user flows
  • Mocking external dependencies and APIs
  • Testing React components and hooks
  • Implementing TDD/BDD workflows

非目标

  • Testing specific backend frameworks (beyond generic API integration)
  • Advanced CI/CD pipeline configuration
  • Tooling for languages other than JavaScript/TypeScript

安装

请先添加 Marketplace

/plugin marketplace add wshobson/agents
/plugin install javascript-typescript@claude-code-workflows

质量评分

已验证
98 /100
about 24 hours ago 分析

信任信号

最近提交3 days ago
星标35.3k
许可证MIT
状态
查看源代码

类似扩展

Deepinit

100

Deep codebase initialization with hierarchical AGENTS.md documentation

技能
Yeachan-Heo

Cleanup Cycles

100

Detect and untangle circular dependencies. Runs madge/skott (TS), pycycle (Py), or compiler-only checks (Go/Rust). Auto-fixes leaf-extractable cycles; reports core cycles for human review. Use when the user asks to find circular imports, fix dependency cycles, or untangle module graph. Example queries — "find circular imports", "fix dependency cycles", "untangle our module graph", "why is madge complaining".

技能
raintree-technology

Netlify Identity

100

用于身份验证、用户注册、登录、密码恢复、OAuth 提供商、基于角色的访问控制或保护路由和函数。始终使用 `@netlify/identity`。切勿使用 `netlify-identity-widget` 或 `gotrue-js` — 它们已弃用。

技能
netlify

Vue Router Best Practices

100

Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.

技能
hyf0

Develop Web Game

100

Use when Codex is building or iterating on a web game (HTML/JS) and needs a reliable development + testing loop: implement small changes, run a Playwright-based test script with short input bursts and intentional pauses, inspect screenshots/text, and review console errors with render_game_to_text.

技能
davila7

Sentry React Router Framework Sdk

100

Full Sentry SDK setup for React Router Framework mode. Use when asked to "add Sentry to React Router Framework", "install @sentry/react-router", or configure error monitoring, tracing, profiling, session replay, logs, or user feedback for a React Router v7 framework app.

技能
getsentry