testing

Selects, runs, and troubleshoots Vitest, Playwright, and browser-MCP test layers for web applications.

1|Updated Sep 15, 2026
One-click install
npx skills add https://github.com/amoai-tech/mdeai --skill testing-amoai-tech
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/amoai-tech/mdeai/tree/main/.claude/skills/testing
Command: npx skills add https://github.com/amoai-tech/mdeai --skill testing-amoai-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill requires playwright, and includes scripts (resource) and references (resource) components.

What problem does it solve? Choosing the right test layer and tooling for a change is error-prone: unit tests miss real auth and network behavior, browser tools overlap, and flaky E2E runs waste time. This Skill routes each testing task to the correct layer, framework recipe, or browser surface for the mdeai.co codebase and similar web projects. ## Core Features & Use Cases - Layer routing: Maps intents to Vitest component tests, Playwright E2E scripts, Claude Preview MCP browser proofs, or exploratory dogfood QA sessions. - Repo-specific recipes: Documents JSDOM polyfills, Supabase mock ordering, MemoryRouter wrapping, and the qa-landlord sign-in pattern for authenticated browser tests. - Structured QA reporting: Provides a five-phase exploratory testing workflow with an issue taxonomy and a dogfood report template. - Use Case: After changing a React onboarding component, run the Vitest recipe for unit coverage, then capture a Claude Preview MCP browser proof with the seeded QA user to verify the flow against live Supabase. ## Quick Start Ask the agent to test your latest component change and it will pick the right layer, run the tests, and report the results.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I test React components with Vitest and JSDOM?โ–ผ

Write colocated *.test.tsx files using @testing-library/react, wrap routing-aware components in MemoryRouter, and mock the Supabase client with vi.mock before importing the module under test. JSDOM polyfills for ResizeObserver and matchMedia live in the shared setup file.

How do I run Playwright tests against a local dev server?โ–ผ

Use the scripts/with_server.py helper to start one or more servers, wait for the port to be ready, and then run your Playwright script. Always call page.wait_for_load_state('networkidle') before inspecting the DOM on dynamic apps.

When should I use unit tests versus browser-based E2E tests?โ–ผ

Use Vitest unit tests for fast feedback on component logic and callbacks. Use browser proofs via Claude Preview MCP or Playwright when the flow depends on real Supabase auth, RLS policies, network round-trips, or route transitions that JSDOM cannot simulate.

Why does my Vitest test fail with an unhandled rejection from Supabase?โ–ผ

The real Supabase client constructs a session at import time using localStorage, which JSDOM does not expose as expected. Register vi.mock for the Supabase client module before importing the module under test so the mock factory applies at parse time.

What are the limitations of exploratory dogfood testing?โ–ผ

Exploratory QA finds functional, visual, and console issues but is not a substitute for load testing, security pentests, or formal accessibility audits. Findings are classified by severity and category, and security concerns should be escalated to specialists.