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.

729 B
Raw Blame
import { describe, expect, it } from 'vitest';
import { mergeCalendarOverlays } from './merge';

describe('calendar overlay composition', () => {
  it('keeps a directly accessible occurrence authoritative', () => {
    const own = { id: 'meeting', calendar: { id: 'own' }, isReadOnly: false };
    const team = { id: 'meeting', calendar: { id: 'team' }, isReadOnly: true };
    expect(mergeCalendarOverlays([own], [team])).toEqual([own]);
  });

  it('adds teammate OOO the viewer cannot read directly', () => {
    const own = { id: 'meeting', calendar: { id: 'own' } };
    const bobOoo = { id: 'bob-ooo', calendar: { id: 'team-ooo:bob' } };
    expect(mergeCalendarOverlays([own], [bobOoo])).toEqual([own, bobOoo]);
  });
});