Permalink
Browse files

unit test: clone

  • Loading branch information...
1 parent f4707b5 commit b58bfbb8748c0b0e2ac691c6913fd1454654f9a4 @triccardi-systran triccardi-systran committed Jul 18, 2012
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/element.js
View
@@ -137,3 +137,13 @@ module.exports.import = function(assert) {
assert.equal(child1, elem.childNodes()[0]); // child1 is the the first child of elem
assert.done();
};
+
+module.exports.clone = function(assert) {
+ var doc = libxml.Document();
+ var elem = doc.node('child');
+ var elem2 = elem.clone();
+ assert.equal(elem.name(), elem2.name());
+ assert.equal(elem.text(), elem2.text());
+ assert.equal(elem.toString(), elem2.toString());
+ assert.done();
+};

0 comments on commit b58bfbb

Please sign in to comment.