aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/traversing.js
diff options
context:
space:
mode:
authortimmywil <tim.willison@thisismedium.com>2011-03-13 21:12:10 -0400
committertimmywil <tim.willison@thisismedium.com>2011-03-13 21:12:10 -0400
commit8246347b7191e79ed09bf1fc4c4a0a58211cf345 (patch)
tree7feb77d3997f2364f69f0490ead9b85a9073ad36 /test/unit/traversing.js
parent6c124d3dd47fb399c7512c5c3b3420e438c32b65 (diff)
downloadjquery-8246347b7191e79ed09bf1fc4c4a0a58211cf345.tar.gz
jquery-8246347b7191e79ed09bf1fc4c4a0a58211cf345.zip
Starting with adding the test
Diffstat (limited to 'test/unit/traversing.js')
-rw-r--r--test/unit/traversing.js9
1 files changed, 9 insertions, 0 deletions
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' );