test(repo): mock de Collection sans any et export CardDocument

This commit is contained in:
devcodetools committed 2026-09-21 17:55:34 +02:00
1 parent 9d743d898f
commit 01337ef480
2 files changed
+37 -25

No files matched your search

+2 -2
View File
@@ -2,7 +2,7 @@ import { MongoClient, type Collection } from 'mongodb'
import type { Card, CardInput } from '../domain/card'
import type { CardRepository } from '../domain/card-repository'
interface CardDocument {
export interface CardDocument {
c_id: string
question: string
response: string
@@ -123,4 +123,4 @@ export class MongoCardRepository implements CardRepository {
const themes: string[] = await this.collection.distinct('theme')
return themes.sort()
}
}
}