write-tests
Write comprehensive unit and integration tests with proper mocking and coverage
وصف مستورد لم يراجعه محرر بعد
جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.
التنزيل
التثبيت
بعد التنزيل، شغّل الأمر في الطرفية. يسأل unzip قبل أن يستبدل أي ملف موجود.
لهذا المشروع
يوضع في: .claude/commands/
mkdir -p .claude/commands && unzip ~/Downloads/write-tests.zip -d .claude/commandsلحسابك على الجهاز كله
يوضع في: ~/.claude/commands/
mkdir -p ~/.claude/commands && unzip ~/Downloads/write-tests.zip -d ~/.claude/commands
التعليمات
Write Tests
Write comprehensive unit and integration tests with framework-specific best practices: $ARGUMENTS
Current Testing Context
- Test framework: !
find . -name "jest.config.*" -o -name "*.test.*" | head -1 && echo "Jest/Vitest detected" || echo "Detect framework" - Target file: Analysis of $ARGUMENTS for test requirements and complexity
- Project patterns: !
find . -name "*.test.*" -o -name "*.spec.*" | head -3existing test patterns - Coverage setup: !
grep -l "coverage" package.json jest.config.* 2>/dev/null | head -1 || echo "Setup needed"
Task
Execute comprehensive test writing with framework-specific optimizations and best practices:
Test Focus: Use $ARGUMENTS to specify target file, unit tests, integration tests, e2e tests, or component tests
Test Writing Framework:
- Code Analysis - Analyze target code structure, identify testable functions, assess dependency complexity, evaluate edge cases
- Test Strategy Design - Plan test organization, design test hierarchies, identify mock requirements, optimize test isolation
- Framework Integration - Setup framework-specific patterns, configure test utilities, implement proper assertions, optimize test performance
- Mock Implementation - Design dependency mocks, implement test doubles, create factory functions, setup async handling
- Test Case Generation - Write unit tests, integration tests, edge cases, error scenarios, performance tests, snapshot tests
- Quality Assurance - Ensure test maintainability, optimize execution speed, validate coverage, implement proper cleanup
Advanced Features: Property-based testing, contract testing, visual regression testing, accessibility testing, performance benchmarking.
Framework Support: Jest/Vitest, React Testing Library, Vue Test Utils, Angular TestBed, Cypress, Playwright integration.
Output: Comprehensive test suite with unit tests, integration tests, proper mocking, test utilities, and coverage optimization.
الملفات
- LICENSE1 ك.ب
- write-tests.md2.2 ك.ب
ما وجده الفحص الآلي
فحصنا الملفات آلياً وقت الاستيراد. هذا ما نبّه إليه الفحص، ولا يعني أن العنصر ضار ولا أنه سليم: اقرأه بنفسك.
- يحتاج مراجعةأدوات مسموحة بلا حدود
في الملف cli-tool/components/commands/testing/write-tests.md
التعليقات (0)
لا تعليقات بعد. كن أول من يعلّق.
سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).