solid-testing
CommunityMaster SolidJS testing with Vitest.
Authorvallafederico
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill provides comprehensive guidance and patterns for effectively testing SolidJS applications using Vitest and @solidjs/testing-library, ensuring robust and maintainable code.
Core Features & Use Cases
- Setup & Configuration: Clear instructions for setting up Vitest, jsdom, and necessary testing libraries.
- Component Rendering: Demonstrates the correct function syntax for rendering SolidJS components.
- User Interaction Testing: Examples using
userEventto simulate user interactions like clicks. - Querying Elements: Detailed explanation of query types (
getBy,findBy, etc.) and their priority order. - Advanced Patterns: Covers testing with context, routing, portals, and asynchronous behavior.
- Primitive Testing: Shows how to test SolidJS primitives using
createRootfor proper cleanup. - Use Case: You've built a complex interactive component in SolidJS and need to write reliable tests to ensure it functions as expected under various user interactions and asynchronous data loads. This Skill provides the exact patterns and code examples to achieve that.
Quick Start
Follow the setup instructions to install Vitest and configure your project for SolidJS testing.
Dependency Matrix
Required Modules
vitestjsdom@solidjs/testing-library@testing-library/user-event@testing-library/jest-dom
Components
scripts
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: solid-testing Download link: https://github.com/vallafederico/solid-ai-rules/archive/main.zip#solid-testing Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.