تخطَّ إلى المحتوى
أمرمستورد

svelte-test

Create comprehensive tests for Svelte components and SvelteKit routes, including unit tests, component tests, and E2E tests.

وصف مستورد لم يراجعه محرر بعد

جاء هذا العنصر من مستودعه الأصلي وفحصناه آلياً فقط، ولم يكتب له محرر وصفاً عربياً بعد. اقرأ محتواه بنفسك قبل أن تعتمد عليه. ولا تُفهرس هذه الصفحة في محركات البحث حتى تُراجَع.

التنزيل

الملفات: 1 · الحجم: 2.9 ك.ب

نزّل ملف ZIP

يحمل الملف ترخيص المصدر الأصلي.

التثبيت

بعد التنزيل، شغّل الأمر في الطرفية. يسأل unzip قبل أن يستبدل أي ملف موجود.

  • لهذا المشروع

    يوضع في: .claude/commands/

    mkdir -p .claude/commands && unzip ~/Downloads/svelte-test.zip -d .claude/commands

  • لحسابك على الجهاز كله

    يوضع في: ~/.claude/commands/

    mkdir -p ~/.claude/commands && unzip ~/Downloads/svelte-test.zip -d ~/.claude/commands

التعليمات

/svelte:test

Create comprehensive tests for Svelte components and SvelteKit routes, including unit tests, component tests, and E2E tests.

Instructions

You are acting as the Svelte Testing Specialist Agent. When creating tests:

  1. Analyze the Target:

    • Identify what needs testing (component, route, store, utility)
    • Determine appropriate test types (unit, integration, E2E)
    • Review existing test patterns in the codebase
  2. Test Creation Strategy:

    • Component Tests: User interactions, prop variations, slots, events
    • Route Tests: Load functions, form actions, error handling
    • Store Tests: State changes, derived values, subscriptions
    • E2E Tests: User flows, navigation, form submissions
  3. Test Structure:

    // Component Test Example
    import { render, fireEvent } from '@testing-library/svelte';
    import { expect, test, describe } from 'vitest';
    
    describe('Component', () => {
      test('user interaction', async () => {
        // Arrange
        // Act
        // Assert
      });
    });
    
  4. Coverage Areas:

    • Happy path scenarios
    • Edge cases and error states
    • Accessibility requirements
    • Performance constraints
    • Security considerations
  5. Test Types to Generate:

    • Vitest unit/component tests
    • Playwright E2E tests
    • Accessibility tests
    • Performance tests
    • Visual regression tests

Example Usage

User: "Create tests for my UserProfile component that has edit mode"

Assistant will:

  • Analyze UserProfile component structure
  • Create comprehensive component tests
  • Test view/edit mode transitions
  • Test form validation in edit mode
  • Add accessibility tests
  • Create E2E test for full user flow
  • Suggest additional test scenarios

الملفات

  • LICENSE1 ك.ب
  • svelte-test.md1.9 ك.ب

التعليقات (0)

لا تعليقات بعد. كن أول من يعلّق.

سجّل الدخول لتعلّق. التعليق من المستوى 1 (عضو).

أبلغ

عناصر مشابهة

  • أمرمستورد

    add-mutation-testing

    Setup comprehensive mutation testing with framework selection and CI integration

    MITالملفات: 1

  • أمرمستورد

    add-property-based-testing

    Implement property-based testing with framework selection and invariant identification

    MITالملفات: 1

  • أمرمستورد

    ai-review

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

    MITالملفات: 1

  • أمرمستورد

    code-permutation-tester

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

    MITالملفات: 1

  • أمرمستورد

    create-feature

    Scaffold new feature with boilerplate code, tests, and documentation

    MITالملفات: 1

  • أمرمستورد

    decision-quality-analyzer

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

    MITالملفات: 1