diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2020-01-13 19:23:01 +0100 |
---|---|---|
committer | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2020-05-18 18:51:34 +0200 |
commit | 8ad78cdbc40efd8db01b0a2e6f7e58b8aaf0c977 (patch) | |
tree | c0ffc48f1aa6e5dadc76e09bf391df99308d250f /test/unit | |
parent | db43ef0bff853bce76f44617aa7219a364d9b176 (diff) | |
download | jquery-8ad78cdbc40efd8db01b0a2e6f7e58b8aaf0c977.tar.gz jquery-8ad78cdbc40efd8db01b0a2e6f7e58b8aaf0c977.zip |
Tests: Remove obsolete jQuery data tests
The tests relied on `jQuery.cache` so they only ever worked in jQuery 1.x.
Closes gh-4586
(cherry picked from commit eb35be528fdea40faab4d89ac859d38dfd024271)
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/attributes.js | 4 | ||||
-rw-r--r-- | test/unit/data.js | 7 | ||||
-rw-r--r-- | test/unit/effects.js | 12 |
3 files changed, 0 insertions, 23 deletions
diff --git a/test/unit/attributes.js b/test/unit/attributes.js index 5bfc0cef5..9d24ff130 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -1430,10 +1430,6 @@ var testToggleClass = function( valueObj, assert ) { e.toggleClass( false ); e.toggleClass(); assert.ok( e.is( ".testD.testE" ), "Assert class present (restored from data)" ); - - // Cleanup - e.removeClass( "testD" ); - assert.expectJqData( this, e[ 0 ], "__className__" ); }; QUnit.test( "toggleClass(String|boolean|undefined[, boolean])", function( assert ) { diff --git a/test/unit/data.js b/test/unit/data.js index 3a2047cff..b19833a6b 100644 --- a/test/unit/data.js +++ b/test/unit/data.js @@ -132,11 +132,6 @@ QUnit.test( "jQuery.data(div)", function( assert ) { var div = document.createElement( "div" ); dataTests( div, assert ); - - // We stored one key in the private data - // assert that nothing else was put in there, and that that - // one stayed there. - assert.expectJqData( this, div, "foo" ); } ); QUnit.test( "jQuery.data({})", function( assert ) { @@ -159,8 +154,6 @@ QUnit.test( "jQuery.data(document)", function( assert ) { assert.expect( 25 ); dataTests( document, assert ); - - assert.expectJqData( this, document, "foo" ); } ); QUnit.test( "jQuery.data(<embed>)", function( assert ) { diff --git a/test/unit/effects.js b/test/unit/effects.js index dfe5b7c32..a1fd642ba 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -90,9 +90,6 @@ QUnit.test( "show()", function( assert ) { assert.ok( pass, "Show with " + name + " does not call animate callback" ); } ); - // Tolerate data from show()/hide() - assert.expectJqData( this, div, "olddisplay" ); - jQuery( "<div id='show-tests'>" + "<div><p><a href='#'></a></p><code></code><pre></pre><span></span></div>" + @@ -217,8 +214,6 @@ supportjQuery.each( hideOptions, function( type, setup ) { } ); clock.tick( 300 ); - - assert.expectJqData( this, $span, "olddisplay" ); } ); QUnit[ @@ -252,8 +247,6 @@ supportjQuery.each( hideOptions, function( type, setup ) { } ); clock.tick( 300 ); - - assert.expectJqData( this, $shadowChild, "olddisplay" ); } ); } ); @@ -1171,9 +1164,6 @@ QUnit.test( "interrupt toggle", function( assert ) { // Save original property value for comparison jQuery.data( this, "startVal", jQuery( this ).css( prop ) ); - - // Expect olddisplay data from our .hide() call below - assert.expectJqData( env, this, "olddisplay" ); } ); // Interrupt a hiding toggle @@ -1623,8 +1613,6 @@ QUnit.test( "animate should set display for disconnected nodes", function( asser assert.strictEqual( $divInline.show()[ 0 ].style.display, "inline", "show() should not change display if it already set" ); - assert.expectJqData( env, $divNone[ 0 ], "olddisplay" ); - jQuery.each( showMethods, function( name, opt ) { jQuery.fn[ name ].apply( jQuery( "<div></div>" ), opt.concat( [ function() { assert.strictEqual( jQuery( this ).css( "display" ), nullParentDisplay, |