Skip to content

Commit

Permalink
Test jQuery.type also with document.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkatic authored and jeresig committed Sep 23, 2010
1 parent 484cc6e commit 894bd02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/unit/core.js
Expand Up @@ -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" );
Expand All @@ -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" );
Expand Down

0 comments on commit 894bd02

Please sign in to comment.