aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/traversing.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-03-16 21:49:29 +0100
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-03-16 21:59:49 +0100
commit1d61fd9407e6fbe82fe55cb0b938307aa0791f77 (patch)
tree514dc05aec89b38336127f464dc4c65ca15e1deb /test/unit/traversing.js
parent04bf577e2f961c9dde85ddadc77f71bc7bc671cc (diff)
downloadjquery-1d61fd9407e6fbe82fe55cb0b938307aa0791f77.tar.gz
jquery-1d61fd9407e6fbe82fe55cb0b938307aa0791f77.zip
Manipulation: Make jQuery.htmlPrefilter an identity function
Closes gh-4642 (cherry picked from 90fed4b453a5becdb7f173d9e3c1492390a1441f)
Diffstat (limited to 'test/unit/traversing.js')
-rw-r--r--test/unit/traversing.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/unit/traversing.js b/test/unit/traversing.js
index e8d23536e..013fd7794 100644
--- a/test/unit/traversing.js
+++ b/test/unit/traversing.js
@@ -197,7 +197,7 @@ QUnit.test( "index()", function( assert ) {
assert.equal( jQuery( "#text2" ).index(), 2, "Returns the index of a child amongst its siblings" );
- assert.equal( jQuery( "<div/>" ).index(), -1, "Node without parent returns -1" );
+ assert.equal( jQuery( "<div></div>" ).index(), -1, "Node without parent returns -1" );
} );
QUnit.test( "index(Object|String|undefined)", function( assert ) {
@@ -502,7 +502,7 @@ QUnit.test( "has(Element)", function( assert ) {
obj = jQuery( "#qunit-fixture" ).has( jQuery( "#sndp" )[ 0 ] );
assert.deepEqual( obj.get(), q( "qunit-fixture" ), "Keeps elements that have the element as a descendant" );
- detached = jQuery( "<a><b><i/></b></a>" );
+ detached = jQuery( "<a><b><i></i></b></a>" );
assert.deepEqual( detached.has( detached.find( "i" )[ 0 ] ).get(), detached.get(), "...Even when detached" );
multipleParent = jQuery( "#qunit-fixture, #header" ).has( jQuery( "#sndp" )[ 0 ] );
@@ -517,7 +517,7 @@ QUnit.test( "has(Selector)", function( assert ) {
obj = jQuery( "#qunit-fixture" ).has( "#sndp" );
assert.deepEqual( obj.get(), q( "qunit-fixture" ), "Keeps elements that have any element matching the selector as a descendant" );
- detached = jQuery( "<a><b><i/></b></a>" );
+ detached = jQuery( "<a><b><i></i></b></a>" );
assert.deepEqual( detached.has( "i" ).get(), detached.get(), "...Even when detached" );
multipleParent = jQuery( "#qunit-fixture, #header" ).has( "#sndp" );
@@ -538,7 +538,7 @@ QUnit.test( "has(Arrayish)", function( assert ) {
simple = jQuery( "#qunit-fixture" ).has( jQuery( "#sndp" ) );
assert.deepEqual( simple.get(), q( "qunit-fixture" ), "Keeps elements that have any element in the jQuery list as a descendant" );
- detached = jQuery( "<a><b><i/></b></a>" );
+ detached = jQuery( "<a><b><i></i></b></a>" );
assert.deepEqual( detached.has( detached.find( "i" ) ).get(), detached.get(), "...Even when detached" );
multipleParent = jQuery( "#qunit-fixture, #header" ).has( jQuery( "#sndp" ) );
@@ -566,7 +566,7 @@ QUnit.test( "siblings([String])", function( assert ) {
var set = q( "sndp", "en", "sap" );
assert.deepEqual( jQuery( "#en, #sndp" ).siblings().get(), set, "Check for unique results from siblings" );
assert.deepEqual( jQuery( "#option5a" ).siblings( "option[data-attr]" ).get(), q( "option5c" ), "Has attribute selector in siblings (#9261)" );
- assert.equal( jQuery( "<a/>" ).siblings().length, 0, "Detached elements have no siblings (#11370)" );
+ assert.equal( jQuery( "<a></a>" ).siblings().length, 0, "Detached elements have no siblings (#11370)" );
} );
QUnit[ jQuery.find.compile ? "test" : "skip" ]( "siblings([String])", function( assert ) {
@@ -733,7 +733,7 @@ QUnit.test( "contents()", function( assert ) {
assert.equal( jQuery( "div", ibody ).text(), "span text", "Make sure the correct div is still left after deletion in IFrame" );
- jQuery( "<table/>", ibody ).append( "<tr><td>cell</td></tr>" ).appendTo( ibody );
+ jQuery( "<table></table>", ibody ).append( "<tr><td>cell</td></tr>" ).appendTo( ibody );
jQuery( "table", ibody ).remove();
assert.equal( jQuery( "div", ibody ).length, 1, "Check for JS error on add and delete of a table in IFrame" );
@@ -761,7 +761,7 @@ QUnit.test( "contents() for <template />", function( assert ) {
assert.equal( contents.find( "span" ).text(), "Hello, Web Component!", "Find span in template and check its text" );
- jQuery( "<div id='templateTest' />" ).append(
+ jQuery( "<div id='templateTest'></div>" ).append(
jQuery( jQuery.map( contents, function( node ) {
return document.importNode( node, true );
} ) )
@@ -875,7 +875,7 @@ QUnit.test( "add(String selector)", function( assert ) {
"Check elements from document"
);
- divs = jQuery( "<div/>" ).add( "#sndp" );
+ divs = jQuery( "<div></div>" ).add( "#sndp" );
assert.ok( divs[ 0 ].parentNode, "Sort with the disconnected node last (started with disconnected first)." );
} );
@@ -893,7 +893,7 @@ QUnit.test( "add(String html)", function( assert ) {
assert.expect( 3 );
var x,
- divs = jQuery( "#sndp" ).add( "<div/>" );
+ divs = jQuery( "#sndp" ).add( "<div></div>" );
assert.ok( !divs[ 1 ].parentNode, "Sort with the disconnected node last." );
@@ -906,7 +906,7 @@ QUnit.test( "add(jQuery)", function( assert ) {
assert.expect( 4 );
var x,
- tmp = jQuery( "<div/>" );
+ tmp = jQuery( "<div></div>" );
x = jQuery( [] )
.add(
@@ -935,7 +935,7 @@ QUnit.test( "add(Element)", function( assert ) {
assert.expect( 2 );
var x,
- tmp = jQuery( "<div/>" );
+ tmp = jQuery( "<div></div>" );
x = jQuery( [] ).add( jQuery( "<p id='x1'>xxx</p>" ).appendTo( tmp )[ 0 ] ).add( jQuery( "<p id='x2'>xxx</p>" ).appendTo( tmp )[ 0 ] );
assert.equal( x[ 0 ].id, "x1", "Check on-the-fly element1" );