fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
smartxml: fixing detachment of the document root
[fnpeditor.git]
/
src
/
smartxml
/
smartxml.test.js
diff --git
a/src/smartxml/smartxml.test.js
b/src/smartxml/smartxml.test.js
index
3410407
..
b152d26
100644
(file)
--- a/
src/smartxml/smartxml.test.js
+++ b/
src/smartxml/smartxml.test.js
@@
-385,6
+385,15
@@
describe('smartxml', function() {
describe('Manipulations', function() {
describe('Manipulations', function() {
+ describe('detaching nodes', function() {
+ it('can detach document root node', function() {
+ var doc = getDocumentFromXML('<div></div>');
+
+ doc.root.detach();
+ expect(doc.root).to.equal(null);
+ });
+ });
+
describe('replacing node with another one', function() {
it('replaces node with another one', function() {
var doc = getDocumentFromXML('<div><a></a></div>'),
describe('replacing node with another one', function() {
it('replaces node with another one', function() {
var doc = getDocumentFromXML('<div><a></a></div>'),