feat: add offline library statistics

This commit is contained in:
Jonathan Jogenfors
2026-02-20 23:40:23 +01:00
parent 82c6302549
commit 6982987f3f
14 changed files with 181 additions and 37 deletions
+8 -1
View File
@@ -681,12 +681,19 @@ describe(LibraryService.name, () => {
it('should return library statistics', async () => {
const library = factory.library();
mocks.library.getStatistics.mockResolvedValue({ photos: 10, videos: 0, total: 10, usage: 1337 });
mocks.library.getStatistics.mockResolvedValue({
photos: 10,
videos: 0,
total: 10,
usage: 1337,
offline: 67,
});
await expect(sut.getStatistics(library.id)).resolves.toEqual({
photos: 10,
videos: 0,
total: 10,
usage: 1337,
offline: 67,
});
expect(mocks.library.getStatistics).toHaveBeenCalledWith(library.id);