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
committerGitHub <noreply@github.com>2020-03-16 21:49:29 +0100
commit90fed4b453a5becdb7f173d9e3c1492390a1441f (patch)
tree1415e8746489af4d26b31b422cb9b3db95497cb2 /test/unit/traversing.js
parent5b94a4f847fe2328b1b8f2340b11b6031f95d2d1 (diff)
downloadjquery-90fed4b453a5becdb7f173d9e3c1492390a1441f.tar.gz
jquery-90fed4b453a5becdb7f173d9e3c1492390a1441f.zip
Manipulation: Make jQuery.htmlPrefilter an identity function
Closes gh-4642
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 638e7984a..53b9f11a6 100644
--- a/test/unit/traversing.js
+++ b/test/unit/traversing.js
@@ -252,7 +252,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 ) {
@@ -557,7 +557,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 ] );
@@ -572,7 +572,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" );
@@ -593,7 +593,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" ) );
@@ -625,7 +625,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[ QUnit.jQuerySelectors ? "test" : "skip" ]( "siblings([String])", function( assert ) {
@@ -792,7 +792,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" );
@@ -820,7 +820,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 );
} ) )
@@ -934,7 +934,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)." );
} );
@@ -952,7 +952,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." );
@@ -965,7 +965,7 @@ QUnit.test( "add(jQuery)", function( assert ) {
assert.expect( 4 );
var x,
- tmp = jQuery( "<div/>" );
+ tmp = jQuery( "<div></div>" );
x = jQuery( [] )
.add(
@@ -994,7 +994,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" );