import { describe, expect, test } from 'bun:test';
import { wrapHtmlLines, stripLogMarkers, GIT_LINE_MARKER } from '../src/lib/utils/log-lines';
describe('wrapHtmlLines', () => {
test('wraps each line in a log-line div', () => {
const out = wrapHtmlLines('a\nb');
expect(out).toBe('
a
b
');
});
test('renders an empty line as a non-collapsing space', () => {
expect(wrapHtmlLines('')).toBe('
');
});
test('a git-marked line drops the marker and gets the git class + inline svg', () => {
const out = wrapHtmlLines(`${GIT_LINE_MARKER}Cloning repository...`);
expect(out).toContain('log-line-git');
expect(out).toContain('