skills/smithery.ai/write-tests

write-tests

SKILL.md

Write Tests Skill

Write tests using Vitest. Tests are colocated next to source files.

Structure

src/lib/utils.ts
src/lib/utils.test.ts        # colocated
src/app/api/stats/route.ts
src/app/api/stats/route.test.ts
src/test-utils/
├── setup.ts        # global setup (PGlite, MSW, auth mock)
├── msw-handlers.ts # external API mocks
└── auth.ts         # auth test helpers

Auth Testing

Installs
6
First Seen
Mar 21, 2026