fix issues in core
This commit is contained in:
@@ -60,12 +60,12 @@ describe('GetLeagueScoringConfigUseCase', () => {
|
||||
expect(result.unwrap()).toBeUndefined();
|
||||
expect(output.present).toHaveBeenCalledTimes(1);
|
||||
const presented =
|
||||
output.present.mock.calls[0][0] as GetLeagueScoringConfigResult;
|
||||
expect(presented.league).toEqual(league);
|
||||
expect(presented.season).toEqual(season);
|
||||
expect(presented.scoringConfig).toEqual(scoringConfig);
|
||||
expect(presented.game).toEqual(game);
|
||||
expect(presented.preset).toEqual(preset);
|
||||
output.present.mock.calls[0]?.[0] as GetLeagueScoringConfigResult;
|
||||
expect(presented?.league).toEqual(league);
|
||||
expect(presented?.season).toEqual(season);
|
||||
expect(presented?.scoringConfig).toEqual(scoringConfig);
|
||||
expect(presented?.game).toEqual(game);
|
||||
expect(presented?.preset).toEqual(preset);
|
||||
});
|
||||
|
||||
it('should return scoring config for first season if no active', async () => {
|
||||
@@ -86,12 +86,12 @@ describe('GetLeagueScoringConfigUseCase', () => {
|
||||
expect(result.unwrap()).toBeUndefined();
|
||||
expect(output.present).toHaveBeenCalledTimes(1);
|
||||
const presented =
|
||||
output.present.mock.calls[0][0] as GetLeagueScoringConfigResult;
|
||||
expect(presented.league).toEqual(league);
|
||||
expect(presented.season).toEqual(season);
|
||||
expect(presented.scoringConfig).toEqual(scoringConfig);
|
||||
expect(presented.game).toEqual(game);
|
||||
expect(presented.preset).toBeUndefined();
|
||||
output.present.mock.calls[0]?.[0] as GetLeagueScoringConfigResult;
|
||||
expect(presented?.league).toEqual(league);
|
||||
expect(presented?.season).toEqual(season);
|
||||
expect(presented?.scoringConfig).toEqual(scoringConfig);
|
||||
expect(presented?.game).toEqual(game);
|
||||
expect(presented?.preset).toBeUndefined();
|
||||
});
|
||||
|
||||
it('should return error if league not found', async () => {
|
||||
|
||||
Reference in New Issue
Block a user