solidjs-tests

Enforce best-practice testing patterns for SolidJS projects using Vitest.

Updated Jun 15, 2025
One-click install
npx skills add https://github.com/patrickhaahr/dotfiles --skill solidjs-tests
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solidjs-tests
Source: https://github.com/patrickhaahr/dotfiles/tree/main/opencode/.config/opencode/skills/solidjs-tests
Command: npx skills add https://github.com/patrickhaahr/dotfiles --skill solidjs-tests

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SolidJS testing often suffers from inconsistent patterns. This skill enforces best-practice patterns for writing and validating tests to ensure reliability and maintainability across a codebase.

Core Features & Use Cases

  • Enforces arrow-function wrappers in render calls to preserve SolidJS's reactive ownership tracking.
  • Provides guidelines for unit, component, integration, and end-to-end testing with SolidJS Testing Library and Vitest.
  • Demonstrates setup, configuration, and file organization to promote maintainable test suites in SolidJS projects.

Quick Start

Use this skill to validate that your tests follow the recommended SolidJS testing patterns:

  • Ensure tests import from @solidjs/testing-library
  • Wrap components with an arrow function in render calls
  • Run Vitest to execute the test suite

Frequently Asked Questions about solidjs-tests

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

FAQPage Schema
How do I write reliable unit tests for SolidJS components with Vitest?

Reliable SolidJS unit testing with Vitest requires importing from @solidjs/testing-library and wrapping components in arrow functions during render calls to preserve reactive ownership tracking.

Why do my SolidJS component tests fail to track reactivity during render?

SolidJS reactive tracking fails during tests when components are not wrapped in arrow functions within render calls, which breaks ownership context and causes inconsistent reactive updates.

What is the best way to structure SolidJS testing files for maintainability?

The best way to structure SolidJS testing files is to follow consistent organization patterns across unit, component, integration, and end-to-end tests using Vitest and SolidJS testing utilities.

Does SolidJS testing require specific setup configuration with Vitest?

SolidJS testing requires a Vitest-based workflow setup that integrates SolidJS testing utilities, ensuring proper configuration for reactive ownership tracking and consistent test file organization.

Can I use SolidJS Testing Library for integration and end-to-end tests?

Yes, SolidJS Testing Library supports integration and end-to-end testing alongside unit and component tests, providing guidelines for setup, structure, and interactions within a Vitest workflow.

When should I not use arrow-wrapped render calls in SolidJS tests?

Arrow-wrapped render calls should consistently be used in SolidJS tests, as failing to wrap components breaks reactive ownership tracking and leads to unreliable test outcomes.