aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/traversing.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/traversing.js')
-rw-r--r--test/unit/traversing.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/traversing.js b/test/unit/traversing.js
index c7279cfe5..3fd98f674 100644
--- a/test/unit/traversing.js
+++ b/test/unit/traversing.js
@@ -141,10 +141,11 @@ test("closest()", function() {
});
test("closest(Array)", function() {
- expect(6);
+ expect(7);
same( jQuery("body").closest(["body"]), [{selector:"body", elem:document.body, level:1}], "closest([body])" );
same( jQuery("body").closest(["html"]), [{selector:"html", elem:document.documentElement, level:2}], "closest([html])" );
same( jQuery("body").closest(["div"]), [], "closest([div])" );
+ same( jQuery("#yahoo").closest(["div"]), [{"selector":"div", "elem": document.getElementById("foo"), "level": 3}, { "selector": "div", "elem": document.getElementById("main"), "level": 4 }], "closest([div])" );
same( jQuery("#main").closest(["span,#html"]), [{selector:"span,#html", elem:document.documentElement, level:4}], "closest([span,#html])" );
same( jQuery("body").closest(["body","html"]), [{selector:"body", elem:document.body, level:1}, {selector:"html", elem:document.documentElement, level:2}], "closest([body, html])" );