Test jQuery.type also with document.
authorRobert Katic <robert.katic@gmail.com>
Fri, 10 Sep 2010 01:26:47 +0000 (03:26 +0200)
committerjeresig <jeresig@gmail.com>
Thu, 23 Sep 2010 16:08:54 +0000 (12:08 -0400)
test/unit/core.js

index 85b8da6..7ef2ad7 100644 (file)
@@ -219,7 +219,7 @@ test("trim", function() {
 });
 
 test("type", function() {
-       expect(22);
+       expect(23);
 
        equals( jQuery.type(null), "null", "null" );
        equals( jQuery.type(undefined), "undefined", "undefined" );
@@ -240,6 +240,7 @@ test("type", function() {
        equals( jQuery.type(new Function("return;")), "function", "Function" );
        equals( jQuery.type(function(){}), "function", "Function" );
        equals( jQuery.type(window), "object", "Window" );
+       equals( jQuery.type(document), "object", "Document" );
        equals( jQuery.type(document.body), "object", "Element" );
        equals( jQuery.type(document.createTextNode("foo")), "object", "TextNode" );
        equals( jQuery.type(document.getElementsByTagName("*")), "object", "NodeList" );