fix issues in core

This commit is contained in:
2025-12-23 14:43:49 +01:00
parent 11492d1ff2
commit df5c20c5cc
62 changed files with 480 additions and 334 deletions

View File

@@ -72,7 +72,7 @@ describe('GetLeagueJoinRequestsUseCase', () => {
expect(result.unwrap()).toBeUndefined();
expect(output.present).toHaveBeenCalledTimes(1);
const presented = output.present.mock.calls[0][0] as GetLeagueJoinRequestsResult;
const presented = output.present.mock.calls[0]?.[0] as GetLeagueJoinRequestsResult;
expect(presented.joinRequests).toHaveLength(1);
expect(presented.joinRequests[0]).toMatchObject({
@@ -81,7 +81,7 @@ describe('GetLeagueJoinRequestsUseCase', () => {
driverId: 'driver-1',
message: 'msg',
});
expect(presented.joinRequests[0].driver).toBe(driver);
expect(presented?.joinRequests[0]?.driver).toBe(driver);
});
it('should return LEAGUE_NOT_FOUND error when league does not exist', async () => {