component-testing
Installation
SKILL.md
Component Testing
Vitest Browser Mode with Playwright. Tests run in real Chromium — every DOM API, CSS layout, and browser behavior is authentic.
Conventions
- Co-locate tests:
foo.browser.test.tsxnext tofoo.tsx - Always wrap in
describenamed after the component - Use
test, notit render()is async — alwaysawaitit- Test behavior through rendered output, not implementation details
- Do NOT test shadcn/ui primitives — only test your own components that compose them
describe("SearchFilter", () => {
test("filters results on input change", async () => { ... });
test("shows empty state when no matches", async () => { ... });
});