@@ -1066,6 +1066,20 @@ test("empty()", function() {
10661066 equals ( j . html ( ) , "" , "Check node,textnode,comment empty works" ) ;
10671067} ) ;
10681068
1069+ test ( "jQuery.clean" , function ( ) {
1070+ var fragment = document . createDocumentFragment ( ) ,
1071+ clean = function ( html ) { return jQuery . clean ( [ html ] , document , fragment , [ ] ) } ;
1072+
1073+ equals ( clean ( '<div>' ) . length , 1 , 'Cleaning a standalone unclosed div element' ) ;
1074+ equals ( clean ( '<div id="foo">' ) . length , 1 , 'Cleaning an unclosed div element with attribute' ) ;
1075+ equals ( clean ( '<div id="foo" />' ) . length , 1 , 'Cleaning a self-closing div element with attribute' ) ;
1076+ equals ( clean ( '<div id="foo"></div>' ) . length , 1 , 'Cleaning a div element with attribute and closing element' ) ;
1077+ equals ( clean ( '<span>' ) . length , 1 , 'Cleaning a standalone unclosed span element' ) ;
1078+ equals ( clean ( '<span id="foo">' ) . length , 1 , 'Cleaning an unclosed span element with attribute' ) ;
1079+ equals ( clean ( '<span id="foo" />' ) . length , 1 , 'Cleaning a self-closing span element with attribute' ) ;
1080+ equals ( clean ( '<span id="foo"></span>' ) . length , 1 , 'Cleaning a span element with attribute and closing element' ) ;
1081+ } ) ;
1082+
10691083test ( "jQuery.cleanData" , function ( ) {
10701084 expect ( 14 ) ;
10711085
0 commit comments