aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/manipulation.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/manipulation.js')
-rw-r--r--test/unit/manipulation.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 73ad67715..30710da58 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -1572,6 +1572,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");
});