resolve todos in website

This commit is contained in:
2025-12-20 12:55:07 +01:00
parent 20588e1c0b
commit 92be9d2e1b
56 changed files with 2476 additions and 78 deletions

View File

@@ -0,0 +1,28 @@
import { describe, it, expect, vi, type Mock } from 'vitest';
import { LogoutUseCase } from './LogoutUseCase';
import type { IdentitySessionPort } from '../ports/IdentitySessionPort';
describe('LogoutUseCase', () => {
let sessionPort: {
clearSession: Mock;
getCurrentSession: Mock;
createSession: Mock;
};
let useCase: LogoutUseCase;
beforeEach(() => {
sessionPort = {
clearSession: vi.fn(),
getCurrentSession: vi.fn(),
createSession: vi.fn(),
};
useCase = new LogoutUseCase(sessionPort as unknown as IdentitySessionPort);
});
it('clears the current session', async () => {
await useCase.execute();
expect(sessionPort.clearSession).toHaveBeenCalledTimes(1);
});
});