diff --git a/libs/api/metadata-converter/src/lib/xml-utils.spec.ts b/libs/api/metadata-converter/src/lib/xml-utils.spec.ts index 7a0b635ac..33a8b3db0 100644 --- a/libs/api/metadata-converter/src/lib/xml-utils.spec.ts +++ b/libs/api/metadata-converter/src/lib/xml-utils.spec.ts @@ -43,11 +43,21 @@ end. }) it('should properly escape special characters in text', () => { - const textNode = new XmlText('Text with <, >, &') + const textNode = new XmlElement( + 'test', + { + 'my-attribute': ' & ', + }, + [new XmlText('Text with <, >, &')] + ) const result = xmlToString(textNode) - expect(result).toBe('Text with <, >, &') + expect(result).toBe( + ` +Text with <, >, & +` + ) }) })