return this.nativeNode.data;
},
+ setText: function(text) {
+ this.nativeNode.data = text;
+ },
+
appendText: function(text) {
this.nativeNode.data = this.nativeNode.data + text;
},
});
});
+ describe('Basic TextNode properties', function() {
+ it('can have its text set', function() {
+ var node = elementNodeFromXML('<div>Alice</div>'),
+ textNode = node.contents()[0];
+
+ textNode.setText('Cat');
+ expect(textNode.getText()).to.equal('Cat');
+ });
+ });
+
describe('Manipulations', function() {
it('appends element node to another element node', function() {