Files
gridpilot.gg/adapters/racing/services/InMemoryRankingService.test.ts
2025-12-23 20:43:57 +01:00

22 lines
669 B
TypeScript

import { describe, expect, it, vi } from 'vitest';
import type { Logger } from '@core/shared/application';
import { InMemoryRankingService } from './InMemoryRankingService';
describe('InMemoryRankingService', () => {
it('returns mock rankings', () => {
const logger = {
debug: vi.fn(),
info: vi.fn(),
warn: vi.fn(),
error: vi.fn(),
} as unknown as Logger;
const service = new InMemoryRankingService(logger);
const rankings = service.getAllDriverRankings();
expect(rankings.length).toBeGreaterThanOrEqual(3);
expect(rankings[0]).toHaveProperty('driverId');
expect(rankings[0]).toHaveProperty('rating');
});
});