@@ -7,13 +7,19 @@ var bareObj = function(value) { return value; };
7
7
var functionReturningObj = function ( value ) { return ( function ( ) { return value ; } ) ; } ;
8
8
9
9
test ( "text()" , function ( ) {
10
- expect ( 3 ) ;
10
+ expect ( 4 ) ;
11
11
var expected = "This link has class=\"blog\": Simon Willison's Weblog" ;
12
12
equal ( jQuery ( "#sap" ) . text ( ) , expected , "Check for merged text of more then one element." ) ;
13
13
14
14
// Check serialization of text values
15
15
equal ( jQuery ( document . createTextNode ( "foo" ) ) . text ( ) , "foo" , "Text node was retreived from .text()." ) ;
16
16
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()." ) ;
17
23
} ) ;
18
24
19
25
test ( "text(undefined)" , function ( ) {
@@ -161,10 +167,10 @@ test("wrap(String) consecutive elements (#10177)", function() {
161
167
162
168
expect ( targets . length * 2 ) ;
163
169
targets . wrap ( "<div class='wrapper'></div>" ) ;
164
-
170
+
165
171
targets . each ( function ( ) {
166
172
var $this = jQuery ( this ) ;
167
-
173
+
168
174
ok ( $this . parent ( ) . is ( '.wrapper' ) , "Check each elements parent is correct (.wrapper)" ) ;
169
175
equal ( $this . siblings ( ) . length , 0 , "Each element should be wrapped individually" ) ;
170
176
} ) ;
0 commit comments