Skip to content

Commit 00ccf18

Browse files
feat: integrate Sveltest testing patterns into MCP
- Add new get-sveltest-patterns tool for vitest-browser-svelte - Include 6 Sveltest documentation sections with use cases - Update svelte-task prompt with testing tool instructions - Support pattern types: setup, component-testing, form-testing, locators, runes-testing, mocking, troubleshooting, best-practices - Add optional component_type parameter for specific examples Closes #103
1 parent f001918 commit 00ccf18

File tree

5 files changed

+690
-0
lines changed

5 files changed

+690
-0
lines changed

documentation/docs/30-capabilities/30-prompts.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ You are a Svelte expert tasked to build components and utilities for Svelte deve
3434
- 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
3535
- 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
3636
- title: vitest, use_cases: testing, unit tests, component testing, test setup, quality assurance, ci/cd pipelines, test-driven development, path: cli/vitest
37+
- 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
38+
- 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
39+
- 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
40+
- 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
41+
- title: Sveltest Common Patterns, use_cases: testing patterns, reusable tests, component testing templates, test structure, accessibility testing, mock verification, path: sveltest/common-patterns
42+
- title: Sveltest Troubleshooting, use_cases: testing issues, debugging tests, common testing problems, strict mode violations, test hanging, mock signature errors, path: sveltest/troubleshooting
3743
- 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
3844
- 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
3945
- 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

packages/mcp-server/src/mcp/handlers/prompts/svelte-task.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ ${available_docs}
1515
1616
</available-docs>
1717
18+
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.
19+
1820
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.
1921
2022
This is the task you will work on:

0 commit comments

Comments
 (0)