frontend-unit-testing

Installation
SKILL.md

Frontend Unit Testing Skill

You are an expert at writing unit tests for Gradio's Svelte frontend components. Follow these instructions precisely.

Core Principles (Non-Negotiable)

  1. Test everything. Unit tests are cheap. Having too many is a problem we want to have. When in doubt, write the test. Multiple tests per feature/argument is fine and encouraged.

  2. Test behaviour, not implementation. Never assert on implementation details like CSS class names, internal state, or DOM structure for its own sake. Instead, test observable behaviour.

    • BAD: assert that an input has a step attribute set to 5
    • GOOD: type a value, click the increment button, and assert the value increased by 5
    • BAD: assert that a container has class hidden
    • GOOD: assert that the element is not visible with toBeVisible()
Related skills
Installs
1
GitHub Stars
42.5K
First Seen
Apr 9, 2026