Commit 6fc2c675 authored by Ariel Flesler's avatar Ariel Flesler

test runner: adding some tests that were missing for the $ constructor.

parent e6fccd71
......@@ -12,7 +12,7 @@ test("Basic requirements", function() {
});
test("$()", function() {
expect(4);
expect(8);
var main = $("#main");
isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" );
......@@ -41,6 +41,15 @@ test("$()", function() {
equals( img.length, 1, "Correct number of elements generated for img" );
var div = $("<div/><hr/><code/><b/>");
equals( div.length, 4, "Correct number of elements generated for div hr code b" );
// can actually yield more than one, when iframes are included, the window is an array as well
equals( $(window).length, 1, "Correct number of elements generated for window" );
equals( $(document).length, 1, "Correct number of elements generated for document" );
equals( $([1,2,3]).get(1), 2, "Test passing an array to the factory" );
equals( $(document.body).get(0), $('body').get(0), "Test passing an html node to the factory" );
});
test("browser", function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment