import { describe, it, expect } from 'vitest'
import {
  formatAcknowledgedByDisplay,
  previewAcknowledgmentNote,
  roleAcknowledgmentMessage,
} from '@/composables/alertAcknowledge'

describe('alertAcknowledge', () => {
  it('buildsRoleAwareNotePreview', () => {
    expect(previewAcknowledgmentNote('NURSE', 'Demo Nurse', 'Escalating to physician'))
      .toBe('[NURSE] Acknowledged by Demo Nurse. Escalating to physician')
  })

  it('usesRoleSpecificAcknowledgmentMessage', () => {
    expect(roleAcknowledgmentMessage('PHYSICIAN')).toContain('physician')
  })

  it('formatsAcknowledgedByDisplay', () => {
    expect(formatAcknowledgedByDisplay('Demo Nurse (NURSE)')).toBe('Demo Nurse (Nurse)')
  })
})
