From 88572ee6924c2322c9d405280b493c4a894f14e2 Mon Sep 17 00:00:00 2001 From: John Resig Date: Wed, 9 Dec 2009 22:03:14 -0800 Subject: Make sure that the correct args are passed in to the filter callback (and by extension, the not callback). Fixes #5594. --- test/unit/traversing.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/unit/traversing.js') 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() { -- cgit v1.2.3