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.

570 B
Raw Blame
import { describe, expect, it } from 'vitest';
import { type MessageId, withAuthor } from './message-id';

describe('withAuthor', () => {
  it('addresses the other side of the turn without changing the turn', () => {
    const prompt: MessageId = { turn: 4, author: 'user' };

    expect(withAuthor(prompt, 'agent')).toEqual({ turn: 4, author: 'agent' });
  });

  it('leaves the original untouched', () => {
    const prompt: MessageId = { turn: 4, author: 'user' };

    withAuthor(prompt, 'agent');

    expect(prompt).toEqual({ turn: 4, author: 'user' });
  });
});