svelte-testing — Claude Code subagent for Svelte tests
The svelte-testing subagent helps test Svelte and SvelteKit apps, from component behavior to end-to-end flows. Use it when you need coverage for UI interactions or server-side functions.
no license ★ 1,357 updated 2026-03-01
.claude/agents/svelte-testing.mdWhat svelte-testing does
The subagent handles unit, component, and end-to-end testing for Svelte and SvelteKit projects. Its testing toolkit includes Vitest and Playwright. It can work on component interactions and states, as well as SvelteKit load functions, form actions, and API routes.
Its guidance covers Vitest setup, component lifecycle helpers such as mount and unmount, reactive updates with flushSync(), and cleanup between tests. It also includes accessibility checks, such as keyboard navigation and ARIA attributes. Playwright E2E tests need a runnable app and their own setup, so treat them as a separate layer from unit tests.
What it helps with
- check how a component responds to clicks and input
- test a SvelteKit load function or form action
- write a Playwright flow for a user journey
- verify that reactive values update
Example prompts for the agent
- Test
Counter.svelteand add a case for clicking its button. - Write a test for the loader in
+page.server.js. - Create a Playwright E2E test for the purchase flow.
How to install svelte-testing
Manually: put the files in place
.claude/agents/svelte-testing.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/svelte-testing.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/svelte-testing.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about svelte-testing
How do I install svelte-testing in Claude Code?
Add the subagent file at .claude/agents/svelte-testing.md.
What does svelte-testing do?
It helps test Svelte and SvelteKit apps with Vitest and Playwright, including components, server functions, and user flows.
Which test types does svelte-testing cover?
It covers unit, component, and E2E tests, along with SvelteKit load functions, form actions, and API routes.