Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/five-llamas-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/mcp': patch
---

Add Sveltest integration with new `get-sveltest-patterns` tool for vitest-browser-svelte testing patterns. Includes setup, component testing, form testing, locators, runes testing, mocking, troubleshooting, and best practices patterns
6 changes: 6 additions & 0 deletions documentation/docs/30-capabilities/30-prompts.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
- title: sveltekit-adapter, use_cases: deployment, production builds, hosting setup, choosing deployment platform, configuring adapters, static site generation, node server, vercel, cloudflare, netlify, path: cli/sveltekit-adapter
- title: tailwindcss, use_cases: project setup, styling, css framework, rapid prototyping, utility-first css, design systems, responsive design, adding tailwind to svelte, path: cli/tailwind
- title: vitest, use_cases: testing, unit tests, component testing, test setup, quality assurance, ci/cd pipelines, test-driven development, path: cli/vitest
- title: Getting Started with Sveltest, use_cases: testing setup, vitest-browser-svelte configuration, browser testing, real browser testing, svelte 5 testing, modern testing setup, path: sveltest/getting-started
- title: Sveltest Testing Patterns, use_cases: component testing, form testing, async testing, runes testing, browser testing, testing patterns, svelte 5 testing, path: sveltest/testing-patterns
- title: Sveltest Browser Testing, use_cases: real browser testing, vitest browser mode, playwright integration, browser automation, e2e testing, client-side testing, path: sveltest/browser-testing
- title: Sveltest Client-Server Alignment, use_cases: full-stack testing, client-server testing, integration testing, form validation testing, api testing, type-safe testing, path: sveltest/client-server-alignment
- title: Sveltest Common Patterns, use_cases: testing patterns, reusable tests, component testing templates, test structure, accessibility testing, mock verification, path: sveltest/common-patterns
- title: Sveltest Troubleshooting, use_cases: testing issues, debugging tests, common testing problems, strict mode violations, test hanging, mock signature errors, path: sveltest/troubleshooting
- title: Introduction, use_cases: learning sveltekit, project setup, understanding framework basics, choosing between svelte and sveltekit, getting started with full-stack apps, path: kit/introduction
- title: Creating a project, use_cases: project setup, starting new sveltekit app, initial development environment, first-time sveltekit users, scaffolding projects, path: kit/creating-a-project
- title: Project types, use_cases: deployment, project setup, choosing adapters, ssg, spa, ssr, serverless, mobile apps, desktop apps, pwa, offline apps, browser extensions, separate backend, docker containers, path: kit/project-types
Expand Down
2 changes: 2 additions & 0 deletions packages/mcp-server/src/mcp/handlers/prompts/svelte-task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ ${available_docs}
</available-docs>
If you need testing patterns for Svelte components using vitest-browser-svelte (real browser testing), you can invoke the \`get-sveltest-patterns\` tool with pattern types like "setup", "component-testing", "form-testing", "runes-testing", "locators", "mocking", "troubleshooting", or "best-practices". This provides modern testing patterns for Svelte 5 applications.
Every time you write a Svelte component or a Svelte module you MUST invoke the \`svelte-autofixer\` tool providing the code. The tool will return a list of issues or suggestions. If there are any issues or suggestions you MUST fix them and call the tool again with the updated code. You MUST keep doing this until the tool returns no issues or suggestions. Only then you can return the code to the user.
This is the task you will work on:
Expand Down
Loading