import { describe, it, expect, beforeEach } from 'vitest';
import { DriverStatsPresenter } from './DriverStatsPresenter';
import type { GetTotalDriversResult } from '@core/racing/application/use-cases/GetTotalDriversUseCase';

describe('DriverStatsPresenter', () => {
  let presenter: DriverStatsPresenter;

  beforeEach(() => {
    presenter = new DriverStatsPresenter();
  });

  describe('present', () => {
    it('should map core result to API response model correctly', () => {
      const output: GetTotalDriversResult = {
        totalDrivers: 42,
      };

      presenter.present(output);

      const response = presenter.getResponseModel();

      expect(response).toEqual({
        totalDrivers: 42,
      });
    });
  });
});