import { describe, it, expect } from 'vitest';
import { buildVisionPrompt } from '@main/ai/visionPrompt.js';

describe('buildVisionPrompt', () => {
  it('includes text, todayKst, dueCandidates, and vocab slice when present', () => {
    const result = buildVisionPrompt(
      '회의 메모',
      '2026-05-09',
      ['2026-05-10', '2026-05-15'],
      ['work', 'meeting', 'project', 'todo']
    );
    expect(result).toContain('회의 메모');
    expect(result).toContain('2026-05-09');
    expect(result).toContain('2026-05-10, 2026-05-15');
    expect(result).toContain('work, meeting, project, todo');
  });

  it('uses (이미지만 있음) placeholder when text is empty', () => {
    const result = buildVisionPrompt('', '2026-05-09', [], []);
    expect(result).toContain('(이미지만 있음)');
    expect(result).not.toContain('\n\n\n'); // no double-blank from empty text
  });
});
