Refactor infra tests, clean E2E step suites, and fix TS in tests
This commit is contained in:
@@ -3,16 +3,7 @@ import { CheckAuthenticationUseCase } from '../../../../packages/application/use
|
||||
import { AuthenticationState } from '../../../../packages/domain/value-objects/AuthenticationState';
|
||||
import { BrowserAuthenticationState } from '../../../../packages/domain/value-objects/BrowserAuthenticationState';
|
||||
import { Result } from '../../../../packages/shared/result/Result';
|
||||
|
||||
interface IAuthenticationService {
|
||||
checkSession(): Promise<Result<AuthenticationState>>;
|
||||
initiateLogin(): Promise<Result<void>>;
|
||||
clearSession(): Promise<Result<void>>;
|
||||
getState(): AuthenticationState;
|
||||
validateServerSide(): Promise<Result<boolean>>;
|
||||
refreshSession(): Promise<Result<void>>;
|
||||
getSessionExpiry(): Promise<Result<Date | null>>;
|
||||
}
|
||||
import type { IAuthenticationService } from '../../../../packages/application/ports/IAuthenticationService';
|
||||
|
||||
interface ISessionValidator {
|
||||
validateSession(): Promise<Result<boolean>>;
|
||||
@@ -27,6 +18,7 @@ describe('CheckAuthenticationUseCase', () => {
|
||||
validateServerSide: Mock;
|
||||
refreshSession: Mock;
|
||||
getSessionExpiry: Mock;
|
||||
verifyPageAuthentication: Mock;
|
||||
};
|
||||
let mockSessionValidator: {
|
||||
validateSession: Mock;
|
||||
@@ -41,6 +33,7 @@ describe('CheckAuthenticationUseCase', () => {
|
||||
validateServerSide: vi.fn(),
|
||||
refreshSession: vi.fn(),
|
||||
getSessionExpiry: vi.fn(),
|
||||
verifyPageAuthentication: vi.fn(),
|
||||
};
|
||||
|
||||
mockSessionValidator = {
|
||||
|
||||
Reference in New Issue
Block a user