diff --git a/tests/unit/NoteRepository.test.ts b/tests/unit/NoteRepository.test.ts index 3d95c4c..37e6abb 100644 --- a/tests/unit/NoteRepository.test.ts +++ b/tests/unit/NoteRepository.test.ts @@ -492,6 +492,19 @@ describe('NoteRepository.countTrashed', () => { expect(repo.countTrashed()).toBe(10); expect(repo.listTrashed({ limit: 5 })).toHaveLength(5); }); + + it('countTrashed returns accurate count (>200 not capped)', () => { + const now = new Date().toISOString(); + for (let i = 0; i < 250; i++) { + const id = repo.create({ rawText: `n${i}` }).id; + repo.trash(id, now); + } + expect(repo.countTrashed()).toBe(250); + }); + + it('countTrashed returns 0 for empty trash', () => { + expect(repo.countTrashed()).toBe(0); + }); }); describe('Active queries exclude deleted notes', () => {