import { describe, it, expect } from 'vitest';
import { formatDateForInput } from '@/features/event/api/eventService';

describe('eventService.formatDateForInput', () => {
  it('formats a valid ISO date to YYYY-MM-DD', () => {
    expect(formatDateForInput('2024-12-31T10:20:30Z')).toBe('2024-12-31');
    expect(formatDateForInput('2024-01-05')).toBe('2024-01-05');
  });

  it('returns empty string for falsy input', () => {
    expect(formatDateForInput('')).toBe('');
  });
});
