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.

606 B
Raw Blame
import { readFileSync } from 'node:fs';
import { LoroDoc } from 'loro-crdt';
import { expect, it } from 'vitest';
import { readSharedCanvas } from './collaboration';

it('the backend creation seed uses the browser Canvas schema and an empty scene', () => {
  const doc = new LoroDoc();
  try {
    doc.import(readFileSync('../../static_assets/canvas-golden.1.bin'));
    const file = readSharedCanvas(doc);
    expect(file.version).toBe(2);
    expect(file.document.items).toEqual({
      [file.document.rootId]: { id: file.document.rootId, type: 'surface' },
    });
  } finally {
    doc.free();
  }
});