Skip to content
CommandImported

write-tests

Write comprehensive unit and integration tests with proper mocking and coverage

Imported description, not reviewed yet

This item came from its original repository and was only scanned automatically; no editor has written an Arabic description for it yet. Read its content yourself before you rely on it. This page is not indexed by search engines until it is reviewed.

Download

Files: 1 · Size: 3.2 KB

Download the ZIP

The file carries the license of the original source.

Install

After downloading, run the command in a terminal. unzip asks before it replaces any file that is there.

  • For this project

    It goes in: .claude/commands/

    mkdir -p .claude/commands && unzip ~/Downloads/write-tests.zip -d .claude/commands

  • For your account on the whole machine

    It goes in: ~/.claude/commands/

    mkdir -p ~/.claude/commands && unzip ~/Downloads/write-tests.zip -d ~/.claude/commands

Instructions

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 -3 existing 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:

  1. Code Analysis - Analyze target code structure, identify testable functions, assess dependency complexity, evaluate edge cases
  2. Test Strategy Design - Plan test organization, design test hierarchies, identify mock requirements, optimize test isolation
  3. Framework Integration - Setup framework-specific patterns, configure test utilities, implement proper assertions, optimize test performance
  4. Mock Implementation - Design dependency mocks, implement test doubles, create factory functions, setup async handling
  5. Test Case Generation - Write unit tests, integration tests, edge cases, error scenarios, performance tests, snapshot tests
  6. 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.

Files

  • LICENSE1 KB
  • write-tests.md2.2 KB

What the automatic scan found

We scanned the files automatically when they were imported. This is what the scan pointed at. It does not mean the item is harmful, and it does not mean it is safe: read it yourself.

  • Needs a lookAllowed tools with no limits

    In file cli-tool/components/commands/testing/write-tests.md

Comments (0)

No comments yet. Be the first.

Sign in to comment. Commenting comes at level 1 (Member).

Report

Similar items

  • CommandImported

    add-mutation-testing

    Setup comprehensive mutation testing with framework selection and CI integration

    MITFiles: 1

  • CommandImported

    add-property-based-testing

    Implement property-based testing with framework selection and invariant identification

    MITFiles: 1

  • CommandImported

    ai-review

    Run an AI-assisted code review that combines static analysis tools with AI review of security, performance, and architecture

    MITFiles: 1

  • CommandImported

    code-permutation-tester

    Test multiple code variations through simulation before implementation with quality gates and performance prediction.

    MITFiles: 1

  • CommandImported

    create-feature

    Scaffold new feature with boilerplate code, tests, and documentation

    MITFiles: 1

  • CommandImported

    decision-quality-analyzer

    Analyze team decision quality with bias detection, scenario testing, and process improvement recommendations

    MITFiles: 1