X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fjquery%2FcoreTest.js;h=c20d4068d7dd690d924fa753b1f30e9b10c9fc52;hb=fe1910d4d9f547774cb26f4770b303635333f8e6;hp=25cb69b307a378c287cfc226433865639bd749b3;hpb=44599e174b5d1f924def5a3950375ead12b9d21b;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 +});