Commit 894bd02a authored by Robert Katic's avatar Robert Katic Committed by jeresig

Test jQuery.type also with document.

parent 484cc6e2
...@@ -219,7 +219,7 @@ test("trim", function() { ...@@ -219,7 +219,7 @@ test("trim", function() {
}); });
test("type", function() { test("type", function() {
expect(22); expect(23);
equals( jQuery.type(null), "null", "null" ); equals( jQuery.type(null), "null", "null" );
equals( jQuery.type(undefined), "undefined", "undefined" ); equals( jQuery.type(undefined), "undefined", "undefined" );
...@@ -240,6 +240,7 @@ test("type", function() { ...@@ -240,6 +240,7 @@ test("type", function() {
equals( jQuery.type(new Function("return;")), "function", "Function" ); equals( jQuery.type(new Function("return;")), "function", "Function" );
equals( jQuery.type(function(){}), "function", "Function" ); equals( jQuery.type(function(){}), "function", "Function" );
equals( jQuery.type(window), "object", "Window" ); equals( jQuery.type(window), "object", "Window" );
equals( jQuery.type(document), "object", "Document" );
equals( jQuery.type(document.body), "object", "Element" ); equals( jQuery.type(document.body), "object", "Element" );
equals( jQuery.type(document.createTextNode("foo")), "object", "TextNode" ); equals( jQuery.type(document.createTextNode("foo")), "object", "TextNode" );
equals( jQuery.type(document.getElementsByTagName("*")), "object", "NodeList" ); equals( jQuery.type(document.getElementsByTagName("*")), "object", "NodeList" );
......
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