import { getFullHeight } from './full-height' describe('full-height', () => { describe('getFullHeight', () => { it('should return full row count including children', () => { expect( getFullHeight( '1', new Set(['1', '11', '12', '13', '2']), new Map([ ['1', { type: 'tree', children: ['11', '12', '13'] }], ]) ) ).toEqual(4) }) it('should return filtered row count', () => { expect( getFullHeight( '1', new Set(['1', '11', '13', '2']), new Map([ ['1', { type: 'tree', children: ['11', '12', '13'] }], ]) ) ).toEqual(3) }) it('should return 1 for non-parent rows', () => { expect( getFullHeight( '2', new Set(['1', '11', '13', '2']), new Map([ ['1', { type: 'tree', children: ['11', '12', '13'] }], ]) ) ).toEqual(1) }) }) })