fix issues in core
This commit is contained in:
@@ -10,7 +10,6 @@ import type { ILeagueRepository } from '../../domain/repositories/ILeagueReposit
|
||||
import { Season } from '../../domain/entities/season/Season';
|
||||
import type { UseCaseOutputPort } from '@core/shared/application';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import { Result } from '@core/shared/application/Result';
|
||||
|
||||
describe('ManageSeasonLifecycleUseCase', () => {
|
||||
let useCase: ManageSeasonLifecycleUseCase;
|
||||
@@ -107,7 +106,11 @@ describe('ManageSeasonLifecycleUseCase', () => {
|
||||
expect(archived.isOk()).toBe(true);
|
||||
expect(archived.unwrap()).toBeUndefined();
|
||||
expect(output.present).toHaveBeenCalledTimes(1);
|
||||
presented = output.present.mock.calls[0][0] as ManageSeasonLifecycleResult;
|
||||
{
|
||||
const presentedRaw = output.present.mock.calls[0]?.[0];
|
||||
expect(presentedRaw).toBeDefined();
|
||||
presented = presentedRaw as ManageSeasonLifecycleResult;
|
||||
}
|
||||
expect(presented.season.status).toBe('archived');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user