linting
This commit is contained in:
@@ -5,7 +5,7 @@ import { CompleteOnboardingPresenter } from '@apps/api/src/modules/driver/presen
|
||||
|
||||
describe('CompleteDriverOnboardingUseCase', () => {
|
||||
let useCase: CompleteDriverOnboardingUseCase;
|
||||
let driverRepository: { findById: any; save: any };
|
||||
let driverRepository: { findById: () => Promise<any>; save: () => Promise<void> };
|
||||
|
||||
beforeEach(() => {
|
||||
driverRepository = {
|
||||
|
||||
@@ -5,7 +5,7 @@ import type { CheckoutServicePort } from '@core/automation/application/ports/Che
|
||||
import type { CheckoutConfirmationPort } from '@core/automation/application/ports/CheckoutConfirmationPort';
|
||||
import type { CheckoutInfoDTO } from '@core/automation/application/dto/CheckoutInfoDTO';
|
||||
import { CheckoutPrice } from '@core/automation/domain/value-objects/CheckoutPrice';
|
||||
import { CheckoutState, CheckoutStateEnum } from '@core/automation/domain/value-objects/CheckoutState';
|
||||
|
||||
import { CheckoutConfirmation } from '@core/automation/domain/value-objects/CheckoutConfirmation';
|
||||
|
||||
/**
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('ICheckoutConfirmationPort contract', () => {
|
||||
it('should define the required interface structure', () => {
|
||||
// This test verifies the port interface contract exists
|
||||
const mockPort: ICheckoutConfirmationPort = {
|
||||
requestCheckoutConfirmation: async (_request: CheckoutConfirmationRequest) => {
|
||||
requestCheckoutConfirmation: async (__request: CheckoutConfirmationRequest) => {
|
||||
return Result.ok(CheckoutConfirmation.create('confirmed'));
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { describe, expect, test } from 'vitest'
|
||||
import { OverlayAction, ActionAck } from '@core/automation/application/ports/IOverlaySyncPort'
|
||||
import { IAutomationEventPublisher, AutomationEvent } from '@core/automation/application/ports/IAutomationEventPublisher'
|
||||
import { OverlayAction } from '@core/automation/application/ports/IOverlaySyncPort'
|
||||
import { IAutomationLifecycleEmitter, LifecycleCallback } from '@core/automation/infrastructure//IAutomationLifecycleEmitter'
|
||||
import { OverlaySyncService } from '@core/automation/application/services/OverlaySyncService'
|
||||
|
||||
@@ -26,7 +25,7 @@ describe('OverlaySyncService (unit)', () => {
|
||||
// create service wiring: pass emitter as dependency (constructor shape expected)
|
||||
const svc = new OverlaySyncService({
|
||||
lifecycleEmitter: emitter,
|
||||
logger: console as any,
|
||||
logger: console as unknown,
|
||||
publisher: { publish: async () => {} },
|
||||
})
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ describe('OverlaySyncService timeout (unit)', () => {
|
||||
const emitter = new MockLifecycleEmitter()
|
||||
const svc = new OverlaySyncService({
|
||||
lifecycleEmitter: emitter,
|
||||
logger: console as any,
|
||||
logger: console as unknown,
|
||||
publisher: { publish: async () => {} },
|
||||
})
|
||||
|
||||
|
||||
@@ -469,7 +469,7 @@ describe('RecalculateChampionshipStandingsUseCase', () => {
|
||||
|
||||
races.forEach((race) => raceRepository.seedRace(race));
|
||||
|
||||
const drivers = ['driver-1', 'driver-2', 'driver-3'];
|
||||
const _drivers = ['driver-1', 'driver-2', 'driver-3'];
|
||||
|
||||
const resultsData: Array<{
|
||||
raceId: string;
|
||||
|
||||
@@ -73,7 +73,7 @@ describe('StartAutomationSessionUseCase', () => {
|
||||
expect(mockSessionRepository.save).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
config,
|
||||
currentStep: expect.objectContaining({ value: 1 }),
|
||||
_currentStep: expect.objectContaining({ value: 1 }),
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import type { LogLevel } from './LoggerLogLevel';
|
||||
import type { LogContext } from './LoggerContext';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AutomationSession } from '../../domain/entities/AutomationSession';
|
||||
import { SessionStateValue } from '../../domain/value-objects/SessionState';
|
||||
|
||||
|
||||
export interface SessionRepositoryPort {
|
||||
save(session: AutomationSession): Promise<void>;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { OverlaySyncPort, OverlayAction, ActionAck } from '../ports/OverlaySyncPort';
|
||||
|
||||
import { AutomationEventPublisherPort, AutomationEvent } from '../ports/AutomationEventPublisherPort';
|
||||
import { AutomationLifecycleEmitterPort, LifecycleCallback } from '../ports/AutomationLifecycleEmitterPort';
|
||||
import { LoggerPort } from '../ports/LoggerPort';
|
||||
|
||||
@@ -37,7 +37,7 @@ export class ClearSessionUseCase {
|
||||
});
|
||||
}
|
||||
return result;
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
this.logger.error('Error clearing user session.', error, {
|
||||
useCase: 'ClearSessionUseCase'
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Result } from '../../../shared/result/Result';
|
||||
import type { Logger } from '@core/shared/application';
|
||||
import type { CheckoutServicePort } from '../ports/CheckoutServicePort';
|
||||
import type { CheckoutConfirmationPort } from '../ports/CheckoutConfirmationPort';
|
||||
import { CheckoutStateEnum } from '../../domain/value-objects/CheckoutState';
|
||||
|
||||
|
||||
interface SessionMetadata {
|
||||
sessionName: string;
|
||||
|
||||
@@ -31,7 +31,7 @@ export class InitiateLoginUseCase {
|
||||
this.logger.warn('Login flow initiation failed.', { error: result.error });
|
||||
}
|
||||
return result;
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
this.logger.error('Error initiating login flow.', error);
|
||||
return Result.fail(error.message || 'Unknown error during login initiation.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user