Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

576 B
Raw Blame
import { describe, expect, it } from 'vitest';
import { getRecipientDisplayName } from './email-user';

describe('getRecipientDisplayName', () => {
  it("names the viewer's own address Me whatever its case", () => {
    expect(
      getRecipientDisplayName(
        { email: '[email protected]', name: 'Viewer Person' },
        '[email protected]'
      )
    ).toBe('Me');
  });

  it('does not call an addressless recipient Me while the viewer is unknown', () => {
    expect(getRecipientDisplayName({ name: 'Alex Doe' }, undefined)).toBe(
      'Alex'
    );
  });
});