aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/manipulation.js
diff options
context:
space:
mode:
authorOleg <markelog@gmail.com>2012-12-20 03:52:08 +0400
committerDave Methvin <dave.methvin@gmail.com>2012-12-20 20:55:30 -0500
commit5afc93c436020f8ceabe8cab449f1c0030ba6ecd (patch)
treec1227810452cb5a1771d79dec20207a5869bade6 /test/unit/manipulation.js
parent96a349e46d61ee05e576b8544051e375094c0b4d (diff)
downloadjquery-5afc93c436020f8ceabe8cab449f1c0030ba6ecd.tar.gz
jquery-5afc93c436020f8ceabe8cab449f1c0030ba6ecd.zip
Fix #13094. Pass index to .before(fn) fn as documented. Close gh-1093.
Diffstat (limited to 'test/unit/manipulation.js')
-rw-r--r--test/unit/manipulation.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 35beb5267..86b26e040 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -2238,3 +2238,11 @@ test( "insertAfter, insertBefore, etc do not work when destination is original e
jQuery("#test4087-multiple").remove();
});
});
+
+test( "Index for function argument should be received (#13094)", 2, function() {
+ var i = 0;
+
+ jQuery("<div/><div/>").before(function( index ) {
+ equal( index, i++, "Index should be correct" );
+ });
+});