Skip to content
Permalink
Browse files

Fixes #13779. Remove nodes in document order (test)

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
  • Loading branch information
rwaldron committed Apr 16, 2013
1 parent 332ebeb commit 7a66283d7d35b2024caf85cb588a0972b900cbcd
Showing with 24 additions and 0 deletions.
  1. +24 −0 test/unit/manipulation.js
@@ -1547,6 +1547,30 @@ test( "remove() event cleaning ", 1, function() {
cleanUp.remove();
});

test( "remove() in document order #13779", 1, function() {
var last,
cleanData = jQuery.cleanData;

jQuery.cleanData = function( nodes ) {
last = nodes[0].textContent;
cleanData.call( this, nodes );
};

jQuery("#qunit-fixture").append(
jQuery.parseHTML(
"<div class='removal-fixture'>1</div>" +
"<div class='removal-fixture'>2</div>" +
"<div class='removal-fixture'>3</div>"
)
);

jQuery(".removal-fixture").remove();

equal( last, 3, "The removal fixtures were removed in document order" );

jQuery.cleanData = cleanData;
});

test( "detach()", 11, function() {
testRemove("detach");
});

0 comments on commit 7a66283

Please sign in to comment.
You can’t perform that action at this time.