diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2021-06-07 00:58:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 00:58:12 +0200 |
commit | 70dae67b73dfea9126f126f516fe8286f1e73417 (patch) | |
tree | e61eafab41ee74330fecf1da2ce125050cfac49b /tests/unit/dialog | |
parent | a12c98574d07f002fd59d166f9fc1fd391581b91 (diff) | |
download | jquery-ui-70dae67b73dfea9126f126f516fe8286f1e73417.tar.gz jquery-ui-70dae67b73dfea9126f126f516fe8286f1e73417.zip |
Build: Migrate from JSHint & JSCS to ESLint
Fixes #15393
Closes gh-1958
Diffstat (limited to 'tests/unit/dialog')
-rw-r--r-- | tests/unit/dialog/core.js | 10 | ||||
-rw-r--r-- | tests/unit/dialog/deprecated.js | 1 | ||||
-rw-r--r-- | tests/unit/dialog/events.js | 1 | ||||
-rw-r--r-- | tests/unit/dialog/helper.js | 1 | ||||
-rw-r--r-- | tests/unit/dialog/methods.js | 5 | ||||
-rw-r--r-- | tests/unit/dialog/options.js | 1 |
6 files changed, 11 insertions, 8 deletions
diff --git a/tests/unit/dialog/core.js b/tests/unit/dialog/core.js index 171d2789e..cb0ee53e0 100644 --- a/tests/unit/dialog/core.js +++ b/tests/unit/dialog/core.js @@ -4,6 +4,7 @@ define( [ "lib/helper", "ui/widgets/dialog" ], function( QUnit, $, helper ) { +"use strict"; // TODO add afterEach callback to remove dialogs QUnit.module( "dialog: core", { afterEach: helper.moduleAfterEach } ); @@ -209,8 +210,7 @@ QUnit.test( "focus tabbable", function( assert ) { function( done ) { var inputs = element.find( "input" ); - assert.equal - ( document.activeElement, inputs[ 1 ], "Focus starts on second input" ); + assert.equal( document.activeElement, inputs[ 1 ], "Focus starts on second input" ); inputs.last().simulate( "keydown", { keyCode: $.ui.keyCode.TAB } ); setTimeout( function() { assert.equal( document.activeElement, inputs[ 0 ], @@ -275,7 +275,7 @@ QUnit.test( "#9048: multiple modal dialogs opened and closed in different order" function( assert ) { var ready = assert.async(); assert.expect( 1 ); - $( "#dialog1, #dialog2" ).dialog( { autoOpen: false, modal:true } ); + $( "#dialog1, #dialog2" ).dialog( { autoOpen: false, modal: true } ); $( "#dialog1" ).dialog( "open" ); $( "#dialog2" ).dialog( "open" ); $( "#dialog1" ).dialog( "close" ); @@ -311,9 +311,7 @@ QUnit.test( "interaction between overlay and other dialogs", function( assert ) // Wait for the modal to init setTimeout( function() { - second. - testWidget - ( "open" ); + second.testWidget( "open" ); // Simulate user tabbing from address bar to an element outside the dialog $( "#favorite-animal" ).trigger( "focus" ); diff --git a/tests/unit/dialog/deprecated.js b/tests/unit/dialog/deprecated.js index ab49fe756..b8cf7a9a5 100644 --- a/tests/unit/dialog/deprecated.js +++ b/tests/unit/dialog/deprecated.js @@ -4,6 +4,7 @@ define( [ "lib/helper", "ui/widgets/dialog" ], function( QUnit, $, helper ) { +"use strict"; QUnit.module( "dialog (deprecated): options", { afterEach: helper.moduleAfterEach } ); diff --git a/tests/unit/dialog/events.js b/tests/unit/dialog/events.js index a98d1396d..eb77de2ff 100644 --- a/tests/unit/dialog/events.js +++ b/tests/unit/dialog/events.js @@ -4,6 +4,7 @@ define( [ "./helper", "ui/widgets/dialog" ], function( QUnit, $, testHelper ) { +"use strict"; QUnit.module( "dialog: events", { afterEach: testHelper.moduleAfterEach } ); diff --git a/tests/unit/dialog/helper.js b/tests/unit/dialog/helper.js index ac013ecfc..55555626a 100644 --- a/tests/unit/dialog/helper.js +++ b/tests/unit/dialog/helper.js @@ -4,6 +4,7 @@ define( [ "lib/helper", "ui/widgets/dialog" ], function( QUnit, $, helper ) { +"use strict"; return $.extend( helper, { drag: function( element, handle, dx, dy ) { diff --git a/tests/unit/dialog/methods.js b/tests/unit/dialog/methods.js index e289d81a7..5d01f223d 100644 --- a/tests/unit/dialog/methods.js +++ b/tests/unit/dialog/methods.js @@ -4,6 +4,7 @@ define( [ "lib/helper", "ui/widgets/dialog" ], function( QUnit, $, helper ) { +"use strict"; QUnit.module( "dialog: methods", { afterEach: function() { @@ -68,7 +69,7 @@ QUnit.test( "destroy", function( assert ) { assert.equal( $( ".ui-widget-overlay" ).length, 0, "overlay does not exist" ); assert.equal( $( document ).data( "ui-dialog-overlays" ), undefined, "ui-dialog-overlays equals the number of open overlays" ); - element = $( "#dialog1" ).dialog( { modal: true } ), + element = $( "#dialog1" ).dialog( { modal: true } ); element2 = $( "#dialog2" ).dialog( { modal: true } ); assert.equal( $( ".ui-widget-overlay" ).length, 2, "overlays created when dialogs are open" ); assert.equal( $( document ).data( "ui-dialog-overlays" ), 2, "ui-dialog-overlays equals the number of open overlays" ); @@ -86,7 +87,7 @@ QUnit.test( "destroy", function( assert ) { QUnit.test( "#9000: Dialog leaves broken event handler after close/destroy in certain cases", function( assert ) { var ready = assert.async(); assert.expect( 1 ); - $( "#dialog1" ).dialog( { modal:true } ).dialog( "close" ).dialog( "destroy" ); + $( "#dialog1" ).dialog( { modal: true } ).dialog( "close" ).dialog( "destroy" ); setTimeout( function() { $( "#favorite-animal" ).trigger( "focus" ); assert.ok( true, "close and destroy modal dialog before its really opened" ); diff --git a/tests/unit/dialog/options.js b/tests/unit/dialog/options.js index 078d32f8d..2de788a44 100644 --- a/tests/unit/dialog/options.js +++ b/tests/unit/dialog/options.js @@ -7,6 +7,7 @@ define( [ "ui/effects/effect-blind", "ui/effects/effect-explode" ], function( QUnit, $, helper, testHelper ) { +"use strict"; QUnit.module( "dialog: options", { afterEach: helper.moduleAfterEach } ); |