solid-testing

Test SolidJS components, reactive logic, and routes with testing utilities.

2|2|Updated May 1, 2026
One-click install
npx skills add https://github.com/adamhjk/mvtt --skill solid-testing-adamhjk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-testing
Source: https://github.com/adamhjk/mvtt/tree/main/.claude/skills/solid-testing
Command: npx skills add https://github.com/adamhjk/mvtt --skill solid-testing-adamhjk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @solidjs/testing-library, vitest, jsdom, jest-dom, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and tools for testing SolidJS components, reactive functions, and routes, ensuring reliable and maintainable code.

Core Features & Use Cases

  • Component Testing: Render Solid components and perform assertions on their DOM output using @solidjs/testing-library.
  • Reactive Logic Testing: Test signals, effects, and custom stores without rendering UI by using createRoot.
  • Routing Testing: Validate navigation and route-dependent components with <MemoryRouter> from @solidjs/router.
  • Use Case: Develop a new component with asynchronous data fetching and verify its loading state, or test custom hooks in isolation for improved confidence.

Quick Start

Use the solid-testing skill to verify that a counter component increments correctly in response to user interactions.

Frequently Asked Questions about solid-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test SolidJS components and reactive logic effectively?

To test SolidJS components, you render them using `@solidjs/testing-library` and assert against DOM output. For reactive logic, you test signals and stores in isolation using `createRoot` without rendering the UI.

What is the best way to test SolidJS routing and navigation?

The best way to test SolidJS routing is by validating navigation and route-dependent components using `<MemoryRouter>` from `@solidjs/router`, ensuring your route logic remains robust without relying on a real browser environment.

Can I use Vitest with jsdom to test SolidJS applications?

Yes, you can use Vitest with jsdom to test SolidJS applications. The setup provides configurations for jsdom and `jest-dom` to simulate a browser environment, enabling reliable component rendering and DOM assertions.

Does testing SolidJS signals require rendering a full component?

Testing SolidJS signals does not require rendering a full component. You can test reactive functions, effects, and custom stores directly without UI rendering by wrapping them in `createRoot`.

How do I verify asynchronous data fetching and loading states in SolidJS?

You verify asynchronous data fetching in SolidJS by developing a component with asynchronous operations and testing its loading state. This confirms your UI handles data delays correctly and renders expected output.

Why does my SolidJS component test fail to update the DOM after a signal change?

SolidJS component tests may fail to update the DOM if reactive logic is not properly scoped. Wrap signals and effects in `createRoot` during isolated tests to ensure reactivity triggers DOM updates correctly.