+
+ describe('accessing parents', function() {
+ it('returns DocumentNodeElement representing parent in wlxml document as DocumentNodeElement parent', function() {
+ var c = canvas.fromXML('<section><div></div></section>'),
+ div = c.doc().children()[0];
+ expect(div.parent().sameNode(c.doc())).to.be.true;
+ });
+ it('returns DocumentNodeElement representing parent in wlxml document as DocumentTextElement parent', function() {
+ var c = canvas.fromXML('<section>Alice</section>'),
+ text = c.doc().children()[0];
+ expect(text.parent().sameNode(c.doc())).to.be.true;
+ });
+ });
+
+