Prompt Testing

Write Svelte Component Tests

Write tests for Svelte components using Vitest and Testing Library.

sveltetesting
Insert label Svelte Tests
Prompt

Write tests for this Svelte component using Vitest and @testing-library/svelte. Test user-visible behavior: rendering, user interactions, reactive updates, and events. Mock any stores or fetch calls. Use render, fireEvent, and screen queries. Don’t test implementation details.

Add this to your Facet Inserts in Crystl for one-click access.

Get Crystl