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