smithery.ai

test-repository

Guide for testing repository layer. Use when asked to test repositories or data access layer. Directs to implementation-specific testing skills.

First seen Apr 28, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,634 B
  • docs SUMMARY.md 167 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Test Repository

Important: We Test Implementations, Not Interfaces

Repository interfaces (I{Entity}Repository) define contracts but contain no logic to test. We test the implementations that fulfill these contracts.

When to Test

Test repository implementations after you have:

  1. Created the repository interface (create-repository skill)
  2. Implemented at least one concrete implementation

Which Skill to Use

Implementation Skill Location
MockDB (in-memory) test-mockdb-repository tests/repositories/{entity}.mockdb.repository.test.ts
MongoDB test-mongodb-repository tests/repositories/{entity}.mongodb.repository.test.ts

Testing Strategy

Each implementation should be tested to verify it correctly fulfills the interface contract:

  • CRUD operations: create, findById, findAll, update, remove
  • Query features: filtering, pagination, sorting, search
  • Edge cases: not found returns null, delete non-existent returns false
  • Implementation-specific: MongoDB indexes, MockDB in-memory behavior

See Also

  • test-mockdb-repository - Testing MockDB implementations
  • test-mongodb-repository - Testing MongoDB implementations (includes test infrastructure setup)