X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=49976345d55e4e3c1ccbe9171706405c5b43dbb7;hb=ac00fe5bbb2a95fdb747f76fd9dd7c58ba6a531c;hp=d8dbca96c7b7c5e9d9d4d017ca2dc47537bae8db;hpb=35951021545a3ae88018fc5ea3bebd1bc7d09c6a;p=jquery.git diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index d8dbca9..4997634 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -4,13 +4,16 @@ var bareObj = function(value) { return value; }; var functionReturningObj = function(value) { return (function() { return value; }); }; test("text()", function() { - expect(1); + expect(2); var expected = "This link has class=\"blog\": Simon Willison's Weblog"; equals( jQuery('#sap').text(), expected, 'Check for merged text of more then one element.' ); + + // Check serialization of text values + equals( jQuery(document.createTextNode("foo")).text(), "foo", "Text node was retreived from .text()." ); }); var testWrap = function(val) { - expect(10); + expect(15); var defaultText = 'Try them out:' var result = jQuery('#first').wrap(val( '
' )).text(); equals( defaultText, result, 'Check for wrapping of on-the-fly html' ); @@ -40,6 +43,17 @@ var testWrap = function(val) { j = jQuery("