import { expect, describe, it } from 'vitest'; import { prettyPrintXml } from './service'; describe('xml-viewer', () => { it('pretty prints valid XML', () => { const input = '12'; const result = prettyPrintXml(input, {}); expect(result).toContain(''); expect(result).toContain(' 1'); expect(result).toContain(' 2'); }); it('returns error for invalid XML', () => { const input = '1'; const result = prettyPrintXml(input, {}); expect(result).toMatch(/Invalid XML/i); }); });