Test React/Vue/Angular components with Testing Library
Write component tests using Testing Library:
Component code: ${{COMPONENT_CODE}}
Framework: ${{UI_FRAMEWORK}}
User interactions: ${{USER_INTERACTIONS}}
Generate tests that:
- Query by accessible roles
- Simulate user events
- Test component states
- Verify rendered output
- Mock dependencies
- Test async behavior
- Follow best practices (avoid implementation details)Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[{COMPONENT_CODE][{UI_FRAMEWORK][{USER_INTERACTIONS]