mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-11-16 18:14:02 +01:00
feat(xml): add XML tools for validation, beautification, and viewing
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { expect, describe, it } from 'vitest';
|
||||
import { validateXml } from './service';
|
||||
|
||||
describe('xml-validator', () => {
|
||||
it('returns Valid XML for well-formed XML', () => {
|
||||
const input = '<root><a>1</a><b>2</b></root>';
|
||||
const result = validateXml(input, {});
|
||||
expect(result).toBe('Valid XML');
|
||||
});
|
||||
|
||||
it('returns error for invalid XML', () => {
|
||||
const input = '<root><a>1</b></root>';
|
||||
const result = validateXml(input, {});
|
||||
expect(result).toMatch(/Invalid XML/i);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user