Studies: Finished & archived section with Archive/Restore
Build and Push Docker Image / build-and-push (push) Successful in 6m3s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-14 16:55:33 -04:00
1 parent afc3206da4
commit 843056b963
6 files changed
+140 -74

No files matched your search

+8
View File
@@ -52,3 +52,11 @@ test('a series can be chosen as a filter, and the search finds studies by series
expect(filterStudies(idx, { series: '__none' }).map((e) => e.id)).toEqual(['b']);
expect(filterStudies(idx, { query: 'advent' }).map((e) => e.id)).toEqual(['c']);
});
test('archived studies are left out unless asked for', () => {
const idx = [{ id: 'a', title: 'Live' }, { id: 'b', title: 'Done', archived: true }, { id: 'c', title: 'Done too', archived: true, tags: ['hope'] }];
expect(filterStudies(idx).map((e) => e.id)).toEqual(['a']);
expect(filterStudies(idx, { archived: true }).map((e) => e.id)).toEqual(['b', 'c']);
expect(filterStudies(idx, { archived: true, tags: ['hope'] }).map((e) => e.id)).toEqual(['c']);
expect(filterStudies(idx, { archived: null }).map((e) => e.id)).toEqual(['a', 'b', 'c']);
});