git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure that the correct args are passed in to the filter callback (and by extensio...
[jquery.git]
/
test
/
unit
/
traversing.js
diff --git
a/test/unit/traversing.js
b/test/unit/traversing.js
index
a235bbd
..
c97de6d
100644
(file)
--- a/
test/unit/traversing.js
+++ b/
test/unit/traversing.js
@@
-64,9
+64,11
@@
test("filter(Selector)", function() {
});
test("filter(Function)", 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() { 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() {
});
test("filter(Element)", function() {