fix issues in core

This commit is contained in:
2025-12-23 15:38:50 +01:00
parent df5c20c5cc
commit 120d3bb1a1
125 changed files with 1005 additions and 793 deletions

View File

@@ -35,7 +35,7 @@ describe('UpdateDriverProfileUseCase', () => {
error: vi.fn(),
} as unknown as Logger & { error: ReturnType<typeof vi.fn> };
useCase = new UpdateDriverProfileUseCase(driverRepository, output, logger);
useCase = new UpdateDriverProfileUseCase(driverRepository, logger, output);
});
it('updates driver profile successfully', async () => {
@@ -66,7 +66,9 @@ describe('UpdateDriverProfileUseCase', () => {
expect(driverRepository.update).toHaveBeenCalled();
expect(output.present).toHaveBeenCalledTimes(1);
expect(output.present).toHaveBeenCalledWith({ driverId: 'driver-1' });
const presentedRaw = output.present.mock.calls[0]?.[0];
expect(presentedRaw).toBeDefined();
expect(presentedRaw).toEqual({ id: 'driver-1' });
});
it('returns error when driver not found', async () => {