@@ -7,13 +7,19 @@ var bareObj = function(value) { return value; };
77var functionReturningObj = function ( value ) { return ( function ( ) { return value ; } ) ; } ;
88
99test ( "text()" , function ( ) {
10- expect ( 3 ) ;
10+ expect ( 4 ) ;
1111 var expected = "This link has class=\"blog\": Simon Willison's Weblog" ;
1212 equal ( jQuery ( "#sap" ) . text ( ) , expected , "Check for merged text of more then one element." ) ;
1313
1414 // Check serialization of text values
1515 equal ( jQuery ( document . createTextNode ( "foo" ) ) . text ( ) , "foo" , "Text node was retreived from .text()." ) ;
1616 notEqual ( jQuery ( document ) . text ( ) , "" , "Retrieving text for the document retrieves all text (#10724)." ) ;
17+
18+ // Retrieve from document fragments #10864
19+ var frag = document . createDocumentFragment ( ) ;
20+ frag . appendChild ( document . createTextNode ( "foo" ) ) ;
21+
22+ equal ( jQuery ( frag ) . text ( ) , "foo" , "Document Fragment Text node was retreived from .text()." ) ;
1723} ) ;
1824
1925test ( "text(undefined)" , function ( ) {
@@ -161,10 +167,10 @@ test("wrap(String) consecutive elements (#10177)", function() {
161167
162168 expect ( targets . length * 2 ) ;
163169 targets . wrap ( "<div class='wrapper'></div>" ) ;
164-
170+
165171 targets . each ( function ( ) {
166172 var $this = jQuery ( this ) ;
167-
173+
168174 ok ( $this . parent ( ) . is ( '.wrapper' ) , "Check each elements parent is correct (.wrapper)" ) ;
169175 equal ( $this . siblings ( ) . length , 0 , "Each element should be wrapped individually" ) ;
170176 } ) ;
0 commit comments