Back to list
madooei

test-repository

by madooei

This is a template for a backend service built with TypeScript and Hono.js. It provides a basic structure for creating RESTful APIs.

1🍴 0📅 Jan 5, 2026

SKILL.md


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

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

ImplementationSkillLocation
MockDB (in-memory)test-mockdb-repositorytests/repositories/{entity}.mockdb.repository.test.ts
MongoDBtest-mongodb-repositorytests/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)

Score

Total Score

70/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon