From 8246347b7191e79ed09bf1fc4c4a0a58211cf345 Mon Sep 17 00:00:00 2001 From: timmywil Date: Sun, 13 Mar 2011 21:12:10 -0400 Subject: [PATCH] Starting with adding the test --- test/unit/traversing.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/unit/traversing.js b/test/unit/traversing.js index f5108bdef..9216bb5eb 100644 --- a/test/unit/traversing.js +++ b/test/unit/traversing.js @@ -13,6 +13,15 @@ test("find(String)", function() { same( jQuery("#main").find("> #foo > p").get(), q("sndp", "en", "sap"), "find child elements" ); }); +test("find(node|jQuery object)", function() { + expect( 2 ); + + var $blog = jQuery('.blogTest'), + blog = $blog[0]; + equals( jQuery('#foo').find( $blog ).text(), 'Yahoo', 'Find with blog jQuery object' ); + equals( jQuery('#foo').find( blog ).text(), 'Yahoo', 'Find with blog node' ); +}); + test("is(String)", function() { expect(26); ok( jQuery('#form').is('form'), 'Check for element: A form must be a form' ); -- 2.39.5