mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
feat: add offline library statistics
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user