aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/effects
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-04-06 12:56:07 -0400
committerScott González <scott.gonzalez@gmail.com>2015-04-09 09:26:26 -0400
commita0e3da0459e4fbbde99dfa5f41929fdc82dfde1e (patch)
tree280f92d8b32b235debea7b3dba241237441d56e6 /tests/unit/effects
parentfbc55446fbc397f7f176fd907fd5da5ff3d3abad (diff)
downloadjquery-ui-a0e3da0459e4fbbde99dfa5f41929fdc82dfde1e.tar.gz
jquery-ui-a0e3da0459e4fbbde99dfa5f41929fdc82dfde1e.zip
Effects: Convert tests to new infrastructure
Ref #10119 Ref gh-1528
Diffstat (limited to 'tests/unit/effects')
-rw-r--r--tests/unit/effects/effects.html34
-rw-r--r--tests/unit/effects/effects_core.js25
-rw-r--r--tests/unit/effects/effects_scale.js8
3 files changed, 30 insertions, 37 deletions
diff --git a/tests/unit/effects/effects.html b/tests/unit/effects/effects.html
index 352224a7b..d444d3853 100644
--- a/tests/unit/effects/effects.html
+++ b/tests/unit/effects/effects.html
@@ -4,39 +4,9 @@
<meta charset="utf-8">
<title>jQuery UI Effects Test Suite</title>
- <script src="../../jquery.js"></script>
- <link rel="stylesheet" href="../../../external/qunit/qunit.css">
- <script src="../../../external/qunit/qunit.js"></script>
- <script src="../../../external/jquery-simulate/jquery.simulate.js"></script>
- <script src="../testsuite.js"></script>
- <script src="../../../external/qunit-assert-classes/qunit-assert-classes.js"></script>
- <script>
- TestHelpers.loadResources({
- js: [
- "ui/effect.js",
- "ui/effect-blind.js",
- "ui/effect-bounce.js",
- "ui/effect-clip.js",
- "ui/effect-drop.js",
- "ui/effect-explode.js",
- "ui/effect-fade.js",
- "ui/effect-fold.js",
- "ui/effect-highlight.js",
- "ui/effect-puff.js",
- "ui/effect-pulsate.js",
- "ui/effect-scale.js",
- "ui/effect-shake.js",
- "ui/effect-size.js",
- "ui/effect-slide.js",
- "ui/effect-transfer.js"
- ]
- });
+ <script src="../../lib/css.js"></script>
+ <script src="../../lib/bootstrap.js" data-modules="effects_core effects_scale">
</script>
-
- <script src="effects_core.js"></script>
- <script src="effects_scale.js"></script>
-
- <script src="../swarminject.js"></script>
<style>
#qunit-fixture {
width: 1000px;
diff --git a/tests/unit/effects/effects_core.js b/tests/unit/effects/effects_core.js
index 346e404c2..76fcaa062 100644
--- a/tests/unit/effects/effects_core.js
+++ b/tests/unit/effects/effects_core.js
@@ -1,4 +1,23 @@
-(function($) {
+define( [
+ "jquery",
+ "lib/common",
+ "ui/effect",
+ "ui/effect-blind",
+ "ui/effect-bounce",
+ "ui/effect-clip",
+ "ui/effect-drop",
+ "ui/effect-explode",
+ "ui/effect-fade",
+ "ui/effect-fold",
+ "ui/effect-highlight",
+ "ui/effect-puff",
+ "ui/effect-pulsate",
+ "ui/effect-scale",
+ "ui/effect-shake",
+ "ui/effect-size",
+ "ui/effect-slide",
+ "ui/effect-transfer"
+], function( $, common ) {
function present( value, array, message ) {
QUnit.push( jQuery.inArray( value, array ) !== -1, value, array, message );
@@ -242,7 +261,7 @@ test( "createPlaceholder: preserves layout affecting properties", function() {
$.each( $.effects.effect, function( effect ) {
module( "effects." + effect );
- TestHelpers.testJshint( "effect-" + effect );
+ common.testJshint( "effect-" + effect );
if ( effect === "transfer" ) {
return;
@@ -319,4 +338,4 @@ $.each( $.effects.effect, function( effect ) {
});
});
-})(jQuery);
+} );
diff --git a/tests/unit/effects/effects_scale.js b/tests/unit/effects/effects_scale.js
index 03446367d..186daf09f 100644
--- a/tests/unit/effects/effects_scale.js
+++ b/tests/unit/effects/effects_scale.js
@@ -1,4 +1,8 @@
-(function( $ ) {
+define( [
+ "jquery",
+ "ui/effect-scale"
+], function( $ ) {
+
module( "effect.scale: Scale" );
function run( position, v, h, vo, ho ) {
@@ -65,4 +69,4 @@ $(function() {
}
});
-})( jQuery );
+} );