fix issues in core
This commit is contained in:
@@ -111,15 +111,15 @@ describe('GetLeagueProtestsUseCase', () => {
|
||||
expect(result.unwrap()).toBeUndefined();
|
||||
|
||||
expect(output.present).toHaveBeenCalledTimes(1);
|
||||
const presented = output.present.mock.calls[0][0] as GetLeagueProtestsResult;
|
||||
const presented = output.present.mock.calls[0]?.[0] as GetLeagueProtestsResult;
|
||||
|
||||
expect(presented.league).toEqual(league);
|
||||
expect(presented.protests).toHaveLength(1);
|
||||
const presentedProtest = presented.protests[0];
|
||||
expect(presentedProtest.protest).toEqual(protest);
|
||||
expect(presentedProtest.race).toEqual(race);
|
||||
expect(presentedProtest.protestingDriver).toEqual(driver1);
|
||||
expect(presentedProtest.accusedDriver).toEqual(driver2);
|
||||
expect(presented?.league).toEqual(league);
|
||||
expect(presented?.protests).toHaveLength(1);
|
||||
const presentedProtest = presented?.protests[0];
|
||||
expect(presentedProtest?.protest).toEqual(protest);
|
||||
expect(presentedProtest?.race).toEqual(race);
|
||||
expect(presentedProtest?.protestingDriver).toEqual(driver1);
|
||||
expect(presentedProtest?.accusedDriver).toEqual(driver2);
|
||||
});
|
||||
|
||||
it('should return empty protests when no races', async () => {
|
||||
@@ -141,10 +141,10 @@ describe('GetLeagueProtestsUseCase', () => {
|
||||
expect(result.unwrap()).toBeUndefined();
|
||||
|
||||
expect(output.present).toHaveBeenCalledTimes(1);
|
||||
const presented = output.present.mock.calls[0][0] as GetLeagueProtestsResult;
|
||||
const presented = output.present.mock.calls[0]?.[0] as GetLeagueProtestsResult;
|
||||
|
||||
expect(presented.league).toEqual(league);
|
||||
expect(presented.protests).toEqual([]);
|
||||
expect(presented?.league).toEqual(league);
|
||||
expect(presented?.protests).toEqual([]);
|
||||
});
|
||||
|
||||
it('should return LEAGUE_NOT_FOUND when league does not exist', async () => {
|
||||
|
||||
Reference in New Issue
Block a user