Added a test for bug #997.
authorJohn Resig <jeresig@gmail.com>
Fri, 16 Mar 2007 00:05:38 +0000 (00:05 +0000)
committerJohn Resig <jeresig@gmail.com>
Fri, 16 Mar 2007 00:05:38 +0000 (00:05 +0000)
src/jquery/coreTest.js

index aa2932b..c8dada4 100644 (file)
@@ -20,7 +20,7 @@ test("$()", function() {
 });\r
 \r
 test("isFunction", function() {\r
-       expect(20);\r
+       expect(21);\r
 \r
        // Make sure that false values return false\r
        ok( !jQuery.isFunction(), "No Value" );\r
@@ -79,6 +79,15 @@ test("isFunction", function() {
 \r
        document.body.removeChild( input );\r
 \r
+       var a = document.createElement("a");\r
+       a.href = "some-function";\r
+       document.body.appendChild( a );\r
+\r
+       // This serializes with the word 'function' in it\r
+       ok( !jQuery.isFunction(a), "Anchor Element" );\r
+\r
+       document.body.removeChild( a );\r
+\r
        // Recursive function calls have lengths and array-like properties\r
        function callme(callback){\r
                function fn(response){\r