import { Text } from 'ink'; import { render } from 'ink-testing-library'; import { describe, expect, it } from 'vitest'; import { IndentedContent } from './indented-content'; describe('IndentedContent', () => { it('should render children', () => { const { lastFrame } = render( Content inside ); expect(lastFrame()).toContain('Content inside'); }); it('should render multiple children', () => { const { lastFrame } = render( First child Second child Third child ); expect(lastFrame()).toContain('First child'); expect(lastFrame()).toContain('Second child'); expect(lastFrame()).toContain('Third child'); }); it('should handle empty children', () => { const { lastFrame } = render({null}); expect(lastFrame()).toBe(''); }); it('should handle text nodes directly', () => { const { lastFrame } = render( Direct text content ); expect(lastFrame()).toContain('Direct text content'); }); });