X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/b2e6eff88e29de706181587f619e0e4b125a5c56..a8795c30def3c501ed298d2708861f8aaa7304e7:/src/wlxml/wlxml.test.js diff --git a/src/wlxml/wlxml.test.js b/src/wlxml/wlxml.test.js index 9904154..af0e23b 100644 --- a/src/wlxml/wlxml.test.js +++ b/src/wlxml/wlxml.test.js @@ -286,6 +286,15 @@ describe('WLXMLDocument', function() { expect(testClassNode.object.testMethod().sameNode(testClassNode)).to.equal(true, '1'); }); + it('allows adding non-function properties to an ElementNode of specific class', function() { + extension = {wlxmlClass: {test_class: {methods: { + testProp: 123 + }}}}; + doc.registerExtension(extension); + testClassNode = doc.root.contents()[1]; + expect(testClassNode.object.testProp).to.equal(123); + }); + it('allows adding transformation to an ElementNode of specific class', function() { extension = {wlxmlClass: {test_class: {transformations: { testTransformation: function() { return this; },