Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 7a66283
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/unit/manipulation.js
Expand Up @@ -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");
});
Expand Down

0 comments on commit 7a66283

Please sign in to comment.