This commit is contained in:
2025-12-31 19:55:43 +01:00
parent 8260bf7baf
commit 167e82a52b
66 changed files with 5124 additions and 228 deletions

View File

@@ -11,6 +11,7 @@ describe('DashboardService', () => {
{ debug: vi.fn(), info: vi.fn(), warn: vi.fn(), error: vi.fn() } as any,
useCase as any,
presenter as any,
{ getDriverAvatar: vi.fn(() => '/media/avatar/test') } as any,
);
await expect(service.getDashboardOverview('d1')).resolves.toEqual({ feed: [] });
@@ -22,6 +23,7 @@ describe('DashboardService', () => {
{ debug: vi.fn(), info: vi.fn(), warn: vi.fn(), error: vi.fn() } as any,
{ execute: vi.fn(async () => Result.err({ code: 'REPOSITORY_ERROR', details: { message: 'boom' } })) } as any,
{ getResponseModel: vi.fn() } as any,
{ getDriverAvatar: vi.fn(() => '/media/avatar/test') } as any,
);
await expect(service.getDashboardOverview('d1')).rejects.toThrow('Failed to get dashboard overview: boom');
@@ -32,6 +34,7 @@ describe('DashboardService', () => {
{ debug: vi.fn(), info: vi.fn(), warn: vi.fn(), error: vi.fn() } as any,
{ execute: vi.fn(async () => Result.err({ code: 'REPOSITORY_ERROR' } as any)) } as any,
{ getResponseModel: vi.fn() } as any,
{ getDriverAvatar: vi.fn(() => '/media/avatar/test') } as any,
);
await expect(service.getDashboardOverview('d1')).rejects.toThrow('Failed to get dashboard overview: Unknown error');