diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2019-05-13 21:39:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-13 21:39:56 +0200 |
commit | 3527a3840585e6a359cd712591c9c57398357b9b (patch) | |
tree | 41446f392d9a8984e31297df3252d1b538f4191e /test/unit/deprecated.js | |
parent | ccbd6b93424cbdbf86f07a86c2e55cbab497d7a3 (diff) | |
download | jquery-3527a3840585e6a359cd712591c9c57398357b9b.tar.gz jquery-3527a3840585e6a359cd712591c9c57398357b9b.zip |
Core: Remove IE-specific support tests, rely on document.documentMode
Also, update some tests to IE-sniff when deciding whether
to skip a test.
Fixes gh-4386
Closes gh-4387
Diffstat (limited to 'test/unit/deprecated.js')
-rw-r--r-- | test/unit/deprecated.js | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/test/unit/deprecated.js b/test/unit/deprecated.js index fd920fb73..c0ebf19d6 100644 --- a/test/unit/deprecated.js +++ b/test/unit/deprecated.js @@ -41,29 +41,25 @@ QUnit.test( "delegate/undelegate", function( assert ) { .remove(); } ); -if ( jQuery.fn.hover ) { - QUnit.test( "hover() mouseenter mouseleave", function( assert ) { - assert.expect( 1 ); - - var times = 0, - handler1 = function() { ++times; }, - handler2 = function() { ++times; }; - - jQuery( "#firstp" ) - .hover( handler1, handler2 ) - .mouseenter().mouseleave() - .off( "mouseenter", handler1 ) - .off( "mouseleave", handler2 ) - .hover( handler1 ) - .mouseenter().mouseleave() - .off( "mouseenter mouseleave", handler1 ) - .mouseenter().mouseleave(); - - assert.equal( times, 4, "hover handlers fired" ); - - } ); -} - +QUnit[ jQuery.fn.hover ? "test" : "skip" ]( "hover() mouseenter mouseleave", function( assert ) { + assert.expect( 1 ); + + var times = 0, + handler1 = function() { ++times; }, + handler2 = function() { ++times; }; + + jQuery( "#firstp" ) + .hover( handler1, handler2 ) + .mouseenter().mouseleave() + .off( "mouseenter", handler1 ) + .off( "mouseleave", handler2 ) + .hover( handler1 ) + .mouseenter().mouseleave() + .off( "mouseenter mouseleave", handler1 ) + .mouseenter().mouseleave(); + + assert.equal( times, 4, "hover handlers fired" ); +} ); QUnit[ jQuery.fn.click ? "test" : "skip" ]( "trigger() shortcuts", function( assert ) { assert.expect( 5 ); |