diff options
author | karan-96 <karanbatra96@gmail.com> | 2017-01-17 22:22:50 +0530 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2017-03-01 11:48:11 +0100 |
commit | ac9e3016645078e1e42120822cfb2076151c8cbe (patch) | |
tree | 51eecd51ad23004e68a20a448fc34fbde9d474b6 /test/unit/manipulation.js | |
parent | bd984f0ee2cf40107a669d80d92566b8625b1e6b (diff) | |
download | jquery-ac9e3016645078e1e42120822cfb2076151c8cbe.tar.gz jquery-ac9e3016645078e1e42120822cfb2076151c8cbe.zip |
Core: Deprecate jQuery.nodeName
Fixes gh-3475
Closes gh-3505
Diffstat (limited to 'test/unit/manipulation.js')
-rw-r--r-- | test/unit/manipulation.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index b1c04dbd5..5959d32bd 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -474,13 +474,13 @@ QUnit.test( "html(String) tag-hyphenated elements (Bug #1987)", function( assert jQuery.each( "thead tbody tfoot colgroup caption tr th td".split( " " ), function( i, name ) { var j = jQuery( "<" + name + "-d></" + name + "-d><" + name + "-d></" + name + "-d>" ); assert.ok( j[ 0 ], "Create a tag-hyphenated element" ); - assert.ok( jQuery.nodeName( j[ 0 ], name.toUpperCase() + "-D" ), "Hyphenated node name" ); - assert.ok( jQuery.nodeName( j[ 1 ], name.toUpperCase() + "-D" ), "Hyphenated node name" ); + assert.ok( j[ 0 ].nodeName === name.toUpperCase() + "-D", "Hyphenated node name" ); + assert.ok( j[ 1 ].nodeName === name.toUpperCase() + "-D", "Hyphenated node name" ); } ); var j = jQuery( "<tr-multiple-hyphens><td-with-hyphen>text</td-with-hyphen></tr-multiple-hyphens>" ); - assert.ok( jQuery.nodeName( j[ 0 ], "TR-MULTIPLE-HYPHENS" ), "Tags with multiple hyphens" ); - assert.ok( jQuery.nodeName( j.children()[ 0 ], "TD-WITH-HYPHEN" ), "Tags with multiple hyphens" ); + assert.ok( j[ 0 ].nodeName === "TR-MULTIPLE-HYPHENS", "Tags with multiple hyphens" ); + assert.ok( j.children()[ 0 ].nodeName === "TD-WITH-HYPHEN", "Tags with multiple hyphens" ); assert.equal( j.children().text(), "text", "Tags with multiple hyphens behave normally" ); } ); @@ -2616,14 +2616,14 @@ QUnit.test( "Make sure specific elements with content created correctly (#13232) jQuery.each( elems, function( name, value ) { var html = "<" + name + ">" + value + "</" + name + ">"; - assert.ok( jQuery.nodeName( jQuery.parseHTML( "<" + name + ">" + value + "</" + name + ">" )[ 0 ], name ), name + " is created correctly" ); + assert.ok( jQuery.parseHTML( "<" + name + ">" + value + "</" + name + ">" )[ 0 ].nodeName.toLowerCase() === name, name + " is created correctly" ); results.push( name ); args.push( html ); } ); jQuery.fn.append.apply( jQuery( "<div/>" ), args ).children().each( function( i ) { - assert.ok( jQuery.nodeName( this, results[ i ] ) ); + assert.ok( this.nodeName.toLowerCase() === results[ i ] ); } ); } ); @@ -2634,11 +2634,11 @@ QUnit.test( "Validate creation of multiple quantities of certain elements (#1381 jQuery.each( tags, function( index, tag ) { jQuery( "<" + tag + "/><" + tag + "/>" ).each( function() { - assert.ok( jQuery.nodeName( this, tag ), tag + " empty elements created correctly" ); + assert.ok( this.nodeName.toLowerCase() === tag, tag + " empty elements created correctly" ); } ); jQuery( "<" + this + "></" + tag + "><" + tag + "></" + tag + ">" ).each( function() { - assert.ok( jQuery.nodeName( this, tag ), tag + " elements with closing tag created correctly" ); + assert.ok( this.nodeName.toLowerCase() === tag, tag + " elements with closing tag created correctly" ); } ); } ); } ); |