diff options
author | John Resig <jeresig@gmail.com> | 2009-12-09 22:03:14 -0800 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-12-09 22:03:14 -0800 |
commit | 88572ee6924c2322c9d405280b493c4a894f14e2 (patch) | |
tree | 4f67cb3edfbcff959237642bb8239d0832c532b2 /test/unit/traversing.js | |
parent | a5f8a1441158b66efb76de1d15f061f87f7bdc17 (diff) | |
download | jquery-88572ee6924c2322c9d405280b493c4a894f14e2.tar.gz jquery-88572ee6924c2322c9d405280b493c4a894f14e2.zip |
Make sure that the correct args are passed in to the filter callback (and by extension, the not callback). Fixes #5594.
Diffstat (limited to 'test/unit/traversing.js')
-rw-r--r-- | test/unit/traversing.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/traversing.js b/test/unit/traversing.js index a235bbd5a..c97de6d4d 100644 --- a/test/unit/traversing.js +++ b/test/unit/traversing.js @@ -64,9 +64,11 @@ test("filter(Selector)", function() { }); test("filter(Function)", function() { - expect(1); + expect(2); same( jQuery("p").filter(function() { return !jQuery("a", this).length }).get(), q("sndp", "first"), "filter(Function)" ); + + same( jQuery("p").filter(function(i, elem) { return !jQuery("a", elem).length }).get(), q("sndp", "first"), "filter(Function) using arg" ); }); test("filter(Element)", function() { |