diff options
author | Alexander Schmitz <arschmitz@gmail.com> | 2015-08-21 00:13:44 -0400 |
---|---|---|
committer | Alexander Schmitz <arschmitz@gmail.com> | 2015-08-21 08:06:24 -0400 |
commit | c13ddf22ed33ea23e5410735c118550a673feb58 (patch) | |
tree | b58b1c2010dce954ffac17f65ed259614ce00c5a | |
parent | 8e28f474e5088fc4502131d76aba7807930f15af (diff) | |
download | jquery-ui-c13ddf22ed33ea23e5410735c118550a673feb58.tar.gz jquery-ui-c13ddf22ed33ea23e5410735c118550a673feb58.zip |
Tests: Style updates
Ref #14246
Ref gh-1588
-rw-r--r-- | tests/lib/bootstrap.js | 12 | ||||
-rw-r--r-- | tests/lib/common.js | 28 | ||||
-rw-r--r-- | tests/lib/css.js | 2 | ||||
-rw-r--r-- | tests/lib/helper.js | 8 | ||||
-rw-r--r-- | tests/lib/qunit-assert-domequal.js | 8 | ||||
-rw-r--r-- | tests/lib/qunit.js | 8 |
6 files changed, 33 insertions, 33 deletions
diff --git a/tests/lib/bootstrap.js b/tests/lib/bootstrap.js index 47289494c..46e0e8ad2 100644 --- a/tests/lib/bootstrap.js +++ b/tests/lib/bootstrap.js @@ -1,6 +1,6 @@ ( function() { -requirejs.config({ +requirejs.config( { paths: { "globalize": "../../../external/globalize/globalize", "globalize/ja-JP": "../../../external/globalize/globalize.culture.ja-JP", @@ -12,7 +12,7 @@ requirejs.config({ "qunit-assert-classes": "../../../external/qunit-assert-classes/qunit-assert-classes", "qunit-assert-close": "../../../external/qunit-assert-close/qunit-assert-close", "qunit": "../../../external/qunit/qunit", - "testswarm": "http://swarm.jquery.org/js/inject.js?" + (new Date()).getTime(), + "testswarm": "http://swarm.jquery.org/js/inject.js?" + ( new Date() ).getTime(), "ui": "../../../ui" }, shim: { @@ -21,7 +21,7 @@ requirejs.config({ "qunit-assert-close": [ "qunit" ], "testswarm": [ "qunit" ] } -}); +} ); // Create a module that disables back compat for UI modules define( "jquery-no-back-compat", [ "jquery" ], function( $ ) { @@ -108,7 +108,7 @@ function jqueryUrl() { // - Automatically loads common, core, events, methods, and options // - data-deprecated: Loads the deprecated test modules for a widget // - data-no-back-compat: Set $.uiBackCompat to false -(function() { +( function() { // Find the script element var scripts = document.getElementsByTagName( "script" ); @@ -128,13 +128,13 @@ function jqueryUrl() { var noBackCompat = !!script.getAttribute( "data-no-back-compat" ); if ( widget ) { - modules = modules.concat([ + modules = modules.concat( [ ( deprecated ? "common-deprecated" : "common" ), "core", "events", "methods", "options" - ]); + ] ); if ( deprecated ) { modules = modules.concat( "deprecated" ); } diff --git a/tests/lib/common.js b/tests/lib/common.js index 8e4acbea8..c3e898535 100644 --- a/tests/lib/common.js +++ b/tests/lib/common.js @@ -1,4 +1,4 @@ -define([ +define( [ "jquery" ], function( $ ) { @@ -17,8 +17,8 @@ function testWidgetDefaults( widget, defaults ) { return; } deepEqual( pluginDefaults[ key ], val, key ); - }); - }); + } ); + } ); // Ensure that all defaults were tested test( "tested defaults", function() { @@ -26,15 +26,15 @@ function testWidgetDefaults( widget, defaults ) { $.each( pluginDefaults, function( key ) { expect( ++count ); ok( key in defaults, key ); - }); - }); + } ); + } ); } function testWidgetOverrides( widget ) { if ( $.uiBackCompat === false ) { test( "$.widget overrides", function() { expect( 4 ); - $.each([ + $.each( [ "_createWidget", "destroy", "option", @@ -42,8 +42,8 @@ function testWidgetOverrides( widget ) { ], function( i, method ) { strictEqual( $.ui[ widget ].prototype[ method ], $.Widget.prototype[ method ], "should not override " + method ); - }); - }); + } ); + } ); } } @@ -61,7 +61,7 @@ function testBasicUsage( widget ) { // Ensure manipulating removed elements works (#3664) $( defaultElement ).appendTo( "body" ).remove()[ widget ]().remove(); ok( true, "initialized on disconnected DOMElement - removed" ); - }); + } ); } exports.testWidget = function( widget, settings ) { @@ -74,7 +74,7 @@ exports.testWidget = function( widget, settings ) { test( "version", function() { expect( 1 ); ok( "version" in $.ui[ widget ].prototype, "version property exists" ); - }); + } ); }; exports.testJshint = function( module ) { @@ -120,14 +120,14 @@ exports.testJshint = function( module ) { ok( passed, errors ); start(); } ) - .fail(function( hintError, srcError ) { + .fail( function( hintError, srcError ) { ok( false, "error loading source: " + ( hintError || srcError ).statusText ); start(); } ); - }); - }); + } ); + } ); }; return exports; -}); +} ); diff --git a/tests/lib/css.js b/tests/lib/css.js index 37353e912..ab707ad2a 100644 --- a/tests/lib/css.js +++ b/tests/lib/css.js @@ -1,4 +1,4 @@ -(function() { +( function() { function includeStyle( url ) { document.write( "<link rel='stylesheet' href='../../../" + url + "'>" ); diff --git a/tests/lib/helper.js b/tests/lib/helper.js index cc7d8c000..400d85489 100644 --- a/tests/lib/helper.js +++ b/tests/lib/helper.js @@ -1,4 +1,4 @@ -define([ +define( [ "jquery" ], function( $ ) { @@ -9,10 +9,10 @@ exports.forceScrollableWindow = function( appendTo ) { // The main testable area is 10000x10000 so to enforce scrolling, // this DIV must be greater than 10000 to work return $( "<div>" ) - .css({ + .css( { height: "11000px", width: "11000px" - }) + } ) .appendTo( appendTo || "#qunit-fixture" ); }; @@ -30,4 +30,4 @@ exports.onFocus = function( element, onFocus ) { return exports; -}); +} ); diff --git a/tests/lib/qunit-assert-domequal.js b/tests/lib/qunit-assert-domequal.js index ba516453d..e8083db77 100644 --- a/tests/lib/qunit-assert-domequal.js +++ b/tests/lib/qunit-assert-domequal.js @@ -100,20 +100,20 @@ function extract( selector, message ) { $.each( domEqual.properties, function( index, attr ) { var value = elem.prop( attr ); result[ attrĀ ] = value != null ? value : ""; - }); + } ); $.each( domEqual.attributes, function( index, attr ) { var value = elem.attr( attr ); result[ attrĀ ] = value != null ? value : ""; - }); + } ); result.style = getElementStyles( elem[ 0 ] ); result.events = $._data( elem[ 0 ], "events" ); result.data = $.extend( {}, elem.data() ); delete result.data[ $.expando ]; children = elem.children(); if ( children.length ) { - result.children = elem.children().map(function() { + result.children = elem.children().map( function() { return extract( $( this ) ); - }).get(); + } ).get(); } else { result.text = elem.text(); } diff --git a/tests/lib/qunit.js b/tests/lib/qunit.js index 87ef8b662..b421341ea 100644 --- a/tests/lib/qunit.js +++ b/tests/lib/qunit.js @@ -10,13 +10,13 @@ define( [ QUnit.config.autostart = false; QUnit.config.requireExpects = true; -QUnit.config.urlConfig.push({ +QUnit.config.urlConfig.push( { id: "nojshint", label: "Skip JSHint", tooltip: "Skip running JSHint, e.g., within TestSwarm, where Jenkins runs it already" -}); +} ); -QUnit.config.urlConfig.push({ +QUnit.config.urlConfig.push( { id: "jquery", label: "jQuery version", value: [ @@ -30,7 +30,7 @@ QUnit.config.urlConfig.push({ "compat-git", "git", "custom" ], tooltip: "Which jQuery Core version to test against" -}); +} ); QUnit.reset = ( function( reset ) { return function() { |