jmservera/aithena/vitest-testing-patterns
Claude Code and agent skill by jmservera/aithena
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Vitest + React Testing Library patterns for aithena-ui
Install
npx vskill@latest install jmservera/aithena/vitest-testing-patternsSKILL.md
The same SKILL.md was published earlier as jmservera/aithena/vitest-testing-patterns.
Overview
Testing patterns for the aithena React frontend. Uses Vitest 4.x + React Testing Library + jsdom. Tests live in src/__tests__/ and follow Given/When/Then structure.
Setup
IntlWrapper (Required for All Component Tests)
All components use react-intl. Tests MUST wrap renders with IntlWrapper:
Without IntlWrapper: Tests will throw "Could not find required intl object" errors.
Component Testing Pattern
Selectors (prefer in order): getByRole > getByText > getByLabelText > getByTestId
Hook Testing Pattern
Mocking Patterns
Fetch Mocking
File Upload Mocking
LocalStorage Mocking
i18n Test Patterns
Locale Completeness
Language Switching
Error Boundary Testing
Anti-Patterns
- ❌ Forgetting IntlWrapper — all components need it
- ❌ Testing implementation details — test behavior, not internal state
- ❌ Exact emoji matching — headless Chromium lacks emoji fonts; use
toContainText - ❌ Using `.check()` on React controlled checkboxes — click the label instead
- ❌ Brittle selectors — prefer
getByRole,getByTextovergetByTestId - ❌ Missing cleanup — always
vi.restoreAllMocks()inafterEach
References
- Test files:
src/aithena-ui/src/__tests__/ - Setup:
src/aithena-ui/vitest.setup.ts - Config:
src/aithena-ui/vite.config.ts(vitest section)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.squad/skills/vitest-testing-patterns/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jmservera/aithena/vitest-testing-patterns)