X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/2ee6a5d07d57b868eb91c59cb633732771f08b77..be2c8ef28fbbcf62764e5bdedf9131a1aad8317b:/modules/documentCanvas/canvas/canvas.test3.js?ds=sidebyside
diff --git a/modules/documentCanvas/canvas/canvas.test3.js b/modules/documentCanvas/canvas/canvas.test3.js
index 8f779d3..b041bac 100644
--- a/modules/documentCanvas/canvas/canvas.test3.js
+++ b/modules/documentCanvas/canvas/canvas.test3.js
@@ -32,6 +32,18 @@ describe('Canvas', function() {
});
});
+ describe('DocumentElements comparison', function() {
+ it('reports dwo DocumentElements to be the same when they represent the same wlxml document element', function() {
+ var c = canvas.fromXML(''),
+ first_div1 = c.doc().children()[0],
+ first_div2 = c.doc().children()[0],
+ second_div = c.doc().children()[1];
+ expect(first_div1.sameNode(first_div1)).to.be.true;
+ expect(first_div1.sameNode(first_div2)).to.be.true;
+ expect(first_div1.sameNode(second_div)).to.be.false;
+ });
+ });
+
describe('traversing', function() {
it('reports element nodes', function() {
var c = canvas.fromXML(''),