import { describe, it, expect } from 'vitest'; import { layoutForest, type TidyNode } from './tidyTree'; // tidyTree is domain-agnostic: it lays out abstract { id, width, children } // nodes, so these tests use hand-built trees with no PersonNodeDTO import. const W = 160; const GAP = 40; function leaf(id: string, width = W): TidyNode { return { id, width, children: [] }; } describe('tidyTree — leaf base case', () => { it('a single leaf lays out at x = 0', () => { const a = leaf('a'); const x = layoutForest([a], GAP); expect(x.get('a')).toBe(0); }); });