test apps api
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { describe, it, expect, vi, type Mock } from 'vitest';
|
||||
import { RecordPageViewUseCase, type RecordPageViewInput, type RecordPageViewOutput } from './RecordPageViewUseCase';
|
||||
import type { IPageViewRepository } from '../../domain/repositories/IPageViewRepository';
|
||||
import { PageView } from '../../domain/entities/PageView';
|
||||
import type { Logger, UseCaseOutputPort } from '@core/shared/application';
|
||||
import type { EntityType, VisitorType } from '../../domain/types/PageView';
|
||||
@@ -14,6 +13,8 @@ describe('RecordPageViewUseCase', () => {
|
||||
let useCase: RecordPageViewUseCase;
|
||||
|
||||
beforeEach(() => {
|
||||
type PageViewRepository = ConstructorParameters<typeof RecordPageViewUseCase>[0];
|
||||
|
||||
pageViewRepository = {
|
||||
save: vi.fn(),
|
||||
};
|
||||
@@ -30,7 +31,7 @@ describe('RecordPageViewUseCase', () => {
|
||||
};
|
||||
|
||||
useCase = new RecordPageViewUseCase(
|
||||
pageViewRepository as unknown as IPageViewRepository,
|
||||
pageViewRepository as unknown as PageViewRepository,
|
||||
logger,
|
||||
output,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user