X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=4776a66eef4cb18a732d71f70dc3f390a06b894f;hb=ff4f265bc0273bda0c8873d470aefa20170abc41;hp=9791767089cf42fd76022981933c016b442f5d04;hpb=958bed09da67c052dfa85c0bb8c0dc88873e5923;p=jquery.git
diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js
index 9791767..4776a66 100644
--- a/src/jquery/coreTest.js
+++ b/src/jquery/coreTest.js
@@ -12,7 +12,7 @@ test("Basic requirements", function() {
});
test("$()", function() {
- expect(3);
+ expect(4);
var main = $("#main");
isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" );
@@ -32,6 +32,9 @@ test("$()", function() {
pass = false;
}
ok( pass, "$('<tag>') needs optional document parameter to ease cross-frame DOM wrangling, see #968" );
+
+ var form = $("form")[0];
+ equals( 15, $(form.elements).size(), "$(form.elements)" );
});
test("isFunction", function() {
@@ -356,14 +359,14 @@ test("wrap(String|Element)", function() {
});
test("append(String|Element|Array<Element>|jQuery)", function() {
- expect(14);
+ expect(17);
var defaultText = 'Try them out:'
var result = $('#first').append('buga');
ok( result.text() == defaultText + 'buga', 'Check if text appending works' );
ok( $('#select3').append('').find('option:last-child').attr('value') == 'appendTest', 'Appending html options to select element');
reset();
- expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
+ var expected = "This link has class=\"blog\": Simon Willison's WeblogTry them out:";
$('#sap').append(document.getElementById('first'));
ok( expected == $('#sap').text(), "Check for appending of element" );
@@ -405,24 +408,36 @@ test("append(String|Element|Array<Element>|jQuery)", function() {
ok( pass, "Test for appending a DOM node to the contents of an IFrame" );
reset();
- $('#select1').appendTo('#foo');
- t( 'Append select', '#foo select', ['select1'] );
-
- reset();
$('