X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=c20d4068d7dd690d924fa753b1f30e9b10c9fc52;hb=9791855ea91988e9ff02063e0c5ece759d8ba898;hp=25cb69b307a378c287cfc226433865639bd749b3;hpb=6b729ff7984d9d4d09dff042a3896022dae3783d;p=jquery.git diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 25cb69b..c20d406 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -213,7 +213,7 @@ test("wrap(String|Element)", function() { }); test("append(String|Element|Array<Element>|jQuery)", function() { - expect(10); + expect(11); var defaultText = 'Try them out:' var result = $('#first').append('buga'); ok( result.text() == defaultText + 'buga', 'Check if text appending works' ); @@ -239,6 +239,10 @@ test("append(String|Element|Array<Element>|jQuery)", function() { ok( $("#sap")[0].innerHTML.match( /5$/ ), "Check for appending a number" ); reset(); + $("#sap").append( " text with spaces " ); + ok( $("#sap")[0].innerHTML.match(/ text with spaces $/), "Check for appending text with spaces" ); + + reset(); ok( $("#sap").append([]), "Check for appending an empty array." ); ok( $("#sap").append(""), "Check for appending an empty string." ); ok( $("#sap").append(document.getElementsByTagName("foo")), "Check for appending an empty nodelist." ); @@ -698,4 +702,4 @@ test("click() context", function() { //console.log( close[0]); // it's the and not a element return false; }).click(); -}); \ No newline at end of file +});