aboutsummaryrefslogtreecommitdiff
path: root/tests/xml
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-08-16 14:46:33 +0100
committerMichael Williamson <mike@zwobble.org>2015-08-16 14:46:33 +0100
commitbc1550787eec24964c506ebbddff9363d114b9e6 (patch)
tree75ec9022ca1fb0f875601e7da4d5f34ddf0c3106 /tests/xml
parent4900c2cf3e66822a33e528fc5f275a3031496006 (diff)
Write descendant nodes
Diffstat (limited to 'tests/xml')
-rw-r--r--tests/xml/writer.tests.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/xml/writer.tests.js b/tests/xml/writer.tests.js
index 5ffecc2..ed7039c 100644
--- a/tests/xml/writer.tests.js
+++ b/tests/xml/writer.tests.js
@@ -14,6 +14,17 @@ describe('xml.writer', function() {
assertXmlString(new Element("root", {}, [new Element("album"), new Element("single")]),
'<root><album/><single/></root>');
});
+
+ test('can write empty descendant elements', function() {
+ var element = new Element("root", {}, [
+ new Element("album", {}, [
+ new Element("year"),
+ new Element("song")
+ ])
+ ]);
+ assertXmlString(element,
+ '<root><album><year/><song/></album></root>');
+ });
});