var toret = {};
this.getAttrs().forEach(function(attr) {
if(isMetaAttribute(attr.name))
- meta[attr.name.substr(5)] = attr.value;
+ toret[attr.name.substr(5)] = attr.value;
});
return toret;
},
var node = nodeFromXML('<header class="class.subclass"></header>');
expect(node.getClass()).to.equal('class.subclass');
});
+
+ it('returns its attributes as dict', function() {
+ var node = nodeFromXML('<span meta-attr1="val1" meta-attr2="val2"></span>');
+ expect(node.getMetaAttributes()).to.eql({attr1: 'val1', attr2: 'val2'});
+ });
});
+
});
});
\ No newline at end of file