X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=32ff83e8613a32c2dfba93fedff7d3481aa2dfd0;hb=ad1cef94bf134ff7f471a0649dac0158a481cd5d;hp=730e18c8f4b3788960dc153f12151786907b1f33;hpb=beebbf8ba44655f2f90750f727ef9cbdfe152f1c;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index 730e18c..32ff83e 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -123,11 +123,18 @@ test("isFunction", function() { }); }); +var foo = false; + test("$('html')", function() { - expect(2); + expect(4); reset(); - ok( $("")[0], "Creating a script" ); + foo = false; + var s = $("")[0]; + ok( s, "Creating a script" ); + ok( !foo, "Make sure the script wasn't executed prematurely" ); + $("body").append(s); + ok( foo, "Executing a scripts contents in the right context" ); reset(); ok( $("")[0], "Creating a link" );