import { describe, it, expect } from 'vitest';
import { buildVerdictSurfaceOutput } from './enforce-verdict-surface.mjs';

describe('buildVerdictSurfaceOutput', () => {
  it('пусто → null', () => { expect(buildVerdictSurfaceOutput([])).toBe(null); expect(buildVerdictSurfaceOutput(null)).toBe(null); });
  it('строки → UserPromptSubmit additionalContext', () => {
    const o = buildVerdictSurfaceOutput(['✅ GO — опечатано', '🚫 NO-GO: X']);
    expect(o.hookSpecificOutput.hookEventName).toBe('UserPromptSubmit');
    expect(o.hookSpecificOutput.additionalContext).toContain('✅ GO — опечатано');
    expect(o.hookSpecificOutput.additionalContext).toContain('🚫 NO-GO: X');
  });
});
