X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=test%2Funit%2Ftraversing.js;h=1a7e6ee8000b478db7e93c6441d88cbc2373d52b;hb=bddd1837bb512b0ed537fbbdecf3ac3f6067adba;hp=16f6043e8fac958a7baf1f3cda12baf2cfb15afd;hpb=cae93c39eb57ccc2acc5e101eda7a56e0a734cdf;p=jquery.git diff --git a/test/unit/traversing.js b/test/unit/traversing.js index 16f6043..1a7e6ee 100644 --- a/test/unit/traversing.js +++ b/test/unit/traversing.js @@ -101,10 +101,10 @@ test("closest()", function() { isSet( jQuery("div").closest("body:first div:last").get(), q("fx-tests"), "closest(body:first div:last)" ); // Test .closest() limited by the context - var jq = jQuery("#nothiddendivchild", document.body); - isSet( jq.closest("html").get(), [], "Context limited." ); - isSet( jq.closest("body").get(), [], "Context limited." ); - isSet( jq.closest("#nothiddendiv").get(), q("nothiddendiv"), "Context not reached." ); + var jq = jQuery("#nothiddendivchild"); + isSet( jq.closest("html", document.body).get(), [], "Context limited." ); + isSet( jq.closest("body", document.body).get(), [], "Context limited." ); + isSet( jq.closest("#nothiddendiv", document.body).get(), q("nothiddendiv"), "Context not reached." ); }); test("not(Selector)", function() {