abrahamvilchesdelacruz/ididntcatchthat/api-testing
Claude Code and agent skill by abrahamvilchesdelacruz/ididntcatchthat
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Convenciones de testing en la API: pirámide de tests, Object Mother, estructura de /test, mocks con jest-mock-extended. Trigger: Al crear o modificar tests en apps/api/, al crear Object Mothers, o al mockear puertos.
Install
npx vskill@latest install abrahamvilchesdelacruz/ididntcatchthat/api-testingSKILL.md
The same SKILL.md was published earlier as abrahamvilchesdelacruz/ididntcatchthat/api-testing.
When to Use
- Al crear un test de use case o domain service
- Al crear un Object Mother para aggregate, value object o request
- Al mockear un repositorio, publisher u otro puerto
- Al estructurar la carpeta
/test
Leereferences/docs.mdpara skills relacionadas, ADRs y documentación externa.
Leereferences/use-case-spec.mdpara el patrón canónico completo del test de use case, implementaciones completas de Mothers, mocks y nomenclatura de describe.La plantilla genérica de Object Mother está enassets/object-mother.template.md.
Pirámide de tests
- Unit: aggregates, value objects, domain services — rápidos, sin I/O
- Integration: use cases con puertos mockeados — nunca adaptadores concretos
- E2E: flujos HTTP completos — solo los caminos críticos
Estructura de /test
Replica exactamente la estructura de /src:
Mothers de primitivos compartidos:
Helper de timers compartido:
Jerarquía de Mothers
Regla: faker solo vive en MotherCreator. Nunca importar faker directamente en un Mother de dominio.
Mocks
| Puerto | Estrategia | |
|---|---|---|
| Repository | mock<FlashcardRepository>() | |
| DomainEventPublisher | mock<DomainEventPublisher>() | |
| Domain services / ports | mock<PortOrService>() |
Reglas
- Los use cases se instancian directamente con
new UseCase(dep1, dep2, ...)enbeforeEach— no se usa DI container - Resetear solo los métodos que el test usa (
.mockReset()) - Usar
JestTimers.setup()/JestTimers.teardown()(de@test/shared/jest-timers) cuando el aggregate o evento dependen denew Date() - Cada Mother en su propio archivo — nunca inline en el spec
random(overrides?)siempre acepta overrides parcialesfrom(request)cuando el use case recibe un objeto de request- Value Object Mothers exponen
invalid()cuando el test lo necesita - Un comportamiento por test
- Imports de src usan el alias
@/; imports de test usan@test/
Anti-patterns
Security
- Security scanPassed, 98 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 repositoryCheckingskills/api-testing/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/abrahamvilchesdelacruz/ididntcatchthat/api-testing)