diff options
author | Scott González <scott.gonzalez@gmail.com> | 2015-04-07 10:30:07 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2015-04-09 09:26:58 -0400 |
commit | dc4b015a8b9acdb5bff2d5dd89737b3d8b64097f (patch) | |
tree | f2dc9ecccc32b33622aef1e597992e5a668efe56 /tests/unit/spinner | |
parent | 42566bdd037ac57cf7d6d7a5d059db2ba42518d9 (diff) | |
download | jquery-ui-dc4b015a8b9acdb5bff2d5dd89737b3d8b64097f.tar.gz jquery-ui-dc4b015a8b9acdb5bff2d5dd89737b3d8b64097f.zip |
Tests: Widget test helpers extend the main helper
Ref #10119
Ref gh-1528
Diffstat (limited to 'tests/unit/spinner')
-rw-r--r-- | tests/unit/spinner/spinner_core.js | 4 | ||||
-rw-r--r-- | tests/unit/spinner/spinner_events.js | 4 | ||||
-rw-r--r-- | tests/unit/spinner/spinner_methods.js | 4 | ||||
-rw-r--r-- | tests/unit/spinner/spinner_test_helpers.js | 9 |
4 files changed, 12 insertions, 9 deletions
diff --git a/tests/unit/spinner/spinner_core.js b/tests/unit/spinner/spinner_core.js index 5faa733c3..d0388a575 100644 --- a/tests/unit/spinner/spinner_core.js +++ b/tests/unit/spinner/spinner_core.js @@ -2,9 +2,9 @@ define( [ "jquery", "./spinner_test_helpers", "ui/spinner" -], function( $, spinnerTestHelpers ) { +], function( $, testHelper ) { -var simulateKeyDownUp = spinnerTestHelpers.simulateKeyDownUp; +var simulateKeyDownUp = testHelper.simulateKeyDownUp; module( "spinner: core" ); diff --git a/tests/unit/spinner/spinner_events.js b/tests/unit/spinner/spinner_events.js index 05d1efe1b..a37d61346 100644 --- a/tests/unit/spinner/spinner_events.js +++ b/tests/unit/spinner/spinner_events.js @@ -2,9 +2,9 @@ define( [ "jquery", "./spinner_test_helpers", "ui/spinner" -], function( $, spinnerTestHelpers ) { +], function( $, testHelper ) { -var simulateKeyDownUp = spinnerTestHelpers.simulateKeyDownUp; +var simulateKeyDownUp = testHelper.simulateKeyDownUp; module( "spinner: events" ); diff --git a/tests/unit/spinner/spinner_methods.js b/tests/unit/spinner/spinner_methods.js index 3f88a9e9c..75ae5c9e8 100644 --- a/tests/unit/spinner/spinner_methods.js +++ b/tests/unit/spinner/spinner_methods.js @@ -2,9 +2,9 @@ define( [ "jquery", "./spinner_test_helpers", "ui/spinner" -], function( $, spinnerTestHelpers ) { +], function( $, testHelper ) { -var simulateKeyDownUp = spinnerTestHelpers.simulateKeyDownUp; +var simulateKeyDownUp = testHelper.simulateKeyDownUp; module( "spinner: methods" ); diff --git a/tests/unit/spinner/spinner_test_helpers.js b/tests/unit/spinner/spinner_test_helpers.js index 9ed904ff4..ab99dcd8e 100644 --- a/tests/unit/spinner/spinner_test_helpers.js +++ b/tests/unit/spinner/spinner_test_helpers.js @@ -1,11 +1,14 @@ -define( function() { +define( [ + "jquery", + "lib/helper" +], function( $, helper ) { -return { +return $.extend( helper, { simulateKeyDownUp: function( element, keyCode, shift ) { element .simulate( "keydown", { keyCode: keyCode, shiftKey: shift || false } ) .simulate( "keyup", { keyCode: keyCode, shiftKey: shift || false } ); } -}; +} ); } ); |