javascript-testing-patterns

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

JavaScript Testing Patterns

JavaScript测试模式

Comprehensive guide for implementing robust testing strategies in JavaScript/TypeScript applications using modern testing frameworks and best practices.
本指南全面介绍如何使用现代测试框架与最佳实践,为JavaScript/TypeScript应用实现高可靠性测试策略。

Use this skill when

适用场景

  • 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
  • 为新项目搭建测试基础设施
  • 为函数和类编写单元测试
  • 为API和服务创建集成测试
  • 为用户流程实现端到端测试
  • 模拟外部依赖与API
  • 测试React、Vue或其他前端组件
  • 落地测试驱动开发(TDD)
  • 在CI/CD流水线中配置持续测试

Do not use this skill when

不适用场景

  • The task is unrelated to javascript testing patterns
  • You need a different domain or tool outside this scope
  • 任务与JavaScript测试模式无关
  • 需要使用本范围外的其他领域知识或工具

Instructions

使用说明

  • Clarify goals, constraints, and required inputs.
  • Apply relevant best practices and validate outcomes.
  • Provide actionable steps and verification.
  • If detailed examples are required, open
    resources/implementation-playbook.md
    .
  • 明确目标、约束条件和所需输入
  • 应用相关最佳实践并验证结果
  • 提供可落地的步骤和验证方法
  • 若需要详细示例,请打开
    resources/implementation-playbook.md

Resources

资源

  • resources/implementation-playbook.md
    for detailed patterns and examples.
  • resources/implementation-playbook.md
    包含详细测试模式与示例。