From commands-framework-svelte
Generates tests for Svelte components and SvelteKit routes: Vitest unit and component tests, Playwright E2E tests, accessibility, and performance checks.
How this command is triggered — by the user, by Claude, or both
Slash command
/commands-framework-svelte:svelte-testFiles this command reads when invoked
The summary Claude sees in its command listing — used to decide when to auto-load this command
# /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 a...
Create comprehensive tests for Svelte components and SvelteKit routes, including unit tests, component tests, and E2E tests.
You are acting as the Svelte Testing Specialist Agent. When creating tests:
Analyze the Target:
Test Creation Strategy:
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
});
});
Coverage Areas:
Test Types to Generate:
User: "Create tests for my UserProfile component that has edit mode"
Assistant will:
npx claudepluginhub davepoon/buildwithclaude --plugin commands-framework-svelte/svelte-testGenerates tests for Svelte components and SvelteKit routes: Vitest unit and component tests, Playwright E2E tests, accessibility, and performance checks.
/svelteAssesses and scaffolds Svelte/SvelteKit projects with Svelte 5 runes reactivity, stores, routing, load functions, form actions, SSR, adapters, hooks, and Vitest tests. Supports flags like --audit, --migrate, --component.
/react-testGenerates comprehensive React Testing Library tests for a specified component name or file path, covering rendering, props, interactions, accessibility, and edge cases.
/e2eGenerates Playwright end-to-end tests for critical user flows like authentication, CRUD operations, and checkout, with setup structure and best practices.