wip: extracting core cont'd - seems to be working
[fnpeditor.git] / src / wlxml / wlxml.test.js
index bb5101f..3d1df03 100644 (file)
@@ -258,10 +258,11 @@ describe('WLXMLDocument', function() {
             doc = getDocumentFromXML('<section>Alice<div class="test_class"></div></section>');
             elementNode = doc.root;
             textNode = doc.root.contents()[0];
+            testClassNode = doc.root.contents('.test_class');
             extension = {};
             
+            expect(testClassNode.object).to.be.undefined;
 
-            // spr+ a expect dotyczacy object api?
         });
 
         it('allows adding method to an ElementNode of specific class', function() {
@@ -280,8 +281,8 @@ describe('WLXMLDocument', function() {
             }}}};
             doc.registerExtension(extension);
             testClassNode = doc.root.contents()[1];
-            expect(testClassNode.object.transform('testTransformation').sameNode(testClassNode)).to.equal(true, '1');
-            expect(testClassNode.object.transform('testTransformation2').sameNode(testClassNode)).to.equal(true, '1');
+            expect(testClassNode.object.testTransformation().sameNode(testClassNode)).to.equal(true, '1');
+            expect(testClassNode.object.testTransformation2().sameNode(testClassNode)).to.equal(true, '1');
         });