Skip to content

Commit c13ddf2

Browse files
committed
Tests: Style updates
Ref #14246 Ref gh-1588
1 parent 8e28f47 commit c13ddf2

File tree

6 files changed

+33
-33
lines changed

6 files changed

+33
-33
lines changed

tests/lib/bootstrap.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
( function() {
22

3-
requirejs.config({
3+
requirejs.config( {
44
paths: {
55
"globalize": "../../../external/globalize/globalize",
66
"globalize/ja-JP": "../../../external/globalize/globalize.culture.ja-JP",
@@ -12,7 +12,7 @@ requirejs.config({
1212
"qunit-assert-classes": "../../../external/qunit-assert-classes/qunit-assert-classes",
1313
"qunit-assert-close": "../../../external/qunit-assert-close/qunit-assert-close",
1414
"qunit": "../../../external/qunit/qunit",
15-
"testswarm": "http://swarm.jquery.org/js/inject.js?" + (new Date()).getTime(),
15+
"testswarm": "http://swarm.jquery.org/js/inject.js?" + ( new Date() ).getTime(),
1616
"ui": "../../../ui"
1717
},
1818
shim: {
@@ -21,7 +21,7 @@ requirejs.config({
2121
"qunit-assert-close": [ "qunit" ],
2222
"testswarm": [ "qunit" ]
2323
}
24-
});
24+
} );
2525

2626
// Create a module that disables back compat for UI modules
2727
define( "jquery-no-back-compat", [ "jquery" ], function( $ ) {
@@ -108,7 +108,7 @@ function jqueryUrl() {
108108
// - Automatically loads common, core, events, methods, and options
109109
// - data-deprecated: Loads the deprecated test modules for a widget
110110
// - data-no-back-compat: Set $.uiBackCompat to false
111-
(function() {
111+
( function() {
112112

113113
// Find the script element
114114
var scripts = document.getElementsByTagName( "script" );
@@ -128,13 +128,13 @@ function jqueryUrl() {
128128
var noBackCompat = !!script.getAttribute( "data-no-back-compat" );
129129

130130
if ( widget ) {
131-
modules = modules.concat([
131+
modules = modules.concat( [
132132
( deprecated ? "common-deprecated" : "common" ),
133133
"core",
134134
"events",
135135
"methods",
136136
"options"
137-
]);
137+
] );
138138
if ( deprecated ) {
139139
modules = modules.concat( "deprecated" );
140140
}

tests/lib/common.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
define([
1+
define( [
22
"jquery"
33
], function( $ ) {
44

@@ -17,33 +17,33 @@ function testWidgetDefaults( widget, defaults ) {
1717
return;
1818
}
1919
deepEqual( pluginDefaults[ key ], val, key );
20-
});
21-
});
20+
} );
21+
} );
2222

2323
// Ensure that all defaults were tested
2424
test( "tested defaults", function() {
2525
var count = 0;
2626
$.each( pluginDefaults, function( key ) {
2727
expect( ++count );
2828
ok( key in defaults, key );
29-
});
30-
});
29+
} );
30+
} );
3131
}
3232

3333
function testWidgetOverrides( widget ) {
3434
if ( $.uiBackCompat === false ) {
3535
test( "$.widget overrides", function() {
3636
expect( 4 );
37-
$.each([
37+
$.each( [
3838
"_createWidget",
3939
"destroy",
4040
"option",
4141
"_trigger"
4242
], function( i, method ) {
4343
strictEqual( $.ui[ widget ].prototype[ method ],
4444
$.Widget.prototype[ method ], "should not override " + method );
45-
});
46-
});
45+
} );
46+
} );
4747
}
4848
}
4949

@@ -61,7 +61,7 @@ function testBasicUsage( widget ) {
6161
// Ensure manipulating removed elements works (#3664)
6262
$( defaultElement ).appendTo( "body" ).remove()[ widget ]().remove();
6363
ok( true, "initialized on disconnected DOMElement - removed" );
64-
});
64+
} );
6565
}
6666

6767
exports.testWidget = function( widget, settings ) {
@@ -74,7 +74,7 @@ exports.testWidget = function( widget, settings ) {
7474
test( "version", function() {
7575
expect( 1 );
7676
ok( "version" in $.ui[ widget ].prototype, "version property exists" );
77-
});
77+
} );
7878
};
7979

8080
exports.testJshint = function( module ) {
@@ -120,14 +120,14 @@ exports.testJshint = function( module ) {
120120
ok( passed, errors );
121121
start();
122122
} )
123-
.fail(function( hintError, srcError ) {
123+
.fail( function( hintError, srcError ) {
124124
ok( false, "error loading source: " + ( hintError || srcError ).statusText );
125125
start();
126126
} );
127-
});
128-
});
127+
} );
128+
} );
129129
};
130130

131131
return exports;
132132

133-
});
133+
} );

tests/lib/css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function() {
1+
( function() {
22

33
function includeStyle( url ) {
44
document.write( "<link rel='stylesheet' href='../../../" + url + "'>" );

tests/lib/helper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
define([
1+
define( [
22
"jquery"
33
], function( $ ) {
44

@@ -9,10 +9,10 @@ exports.forceScrollableWindow = function( appendTo ) {
99
// The main testable area is 10000x10000 so to enforce scrolling,
1010
// this DIV must be greater than 10000 to work
1111
return $( "<div>" )
12-
.css({
12+
.css( {
1313
height: "11000px",
1414
width: "11000px"
15-
})
15+
} )
1616
.appendTo( appendTo || "#qunit-fixture" );
1717
};
1818

@@ -30,4 +30,4 @@ exports.onFocus = function( element, onFocus ) {
3030

3131
return exports;
3232

33-
});
33+
} );

tests/lib/qunit-assert-domequal.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,20 @@ function extract( selector, message ) {
100100
$.each( domEqual.properties, function( index, attr ) {
101101
var value = elem.prop( attr );
102102
result[ attr ] = value != null ? value : "";
103-
});
103+
} );
104104
$.each( domEqual.attributes, function( index, attr ) {
105105
var value = elem.attr( attr );
106106
result[ attr ] = value != null ? value : "";
107-
});
107+
} );
108108
result.style = getElementStyles( elem[ 0 ] );
109109
result.events = $._data( elem[ 0 ], "events" );
110110
result.data = $.extend( {}, elem.data() );
111111
delete result.data[ $.expando ];
112112
children = elem.children();
113113
if ( children.length ) {
114-
result.children = elem.children().map(function() {
114+
result.children = elem.children().map( function() {
115115
return extract( $( this ) );
116-
}).get();
116+
} ).get();
117117
} else {
118118
result.text = elem.text();
119119
}

tests/lib/qunit.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ define( [
1010
QUnit.config.autostart = false;
1111
QUnit.config.requireExpects = true;
1212

13-
QUnit.config.urlConfig.push({
13+
QUnit.config.urlConfig.push( {
1414
id: "nojshint",
1515
label: "Skip JSHint",
1616
tooltip: "Skip running JSHint, e.g., within TestSwarm, where Jenkins runs it already"
17-
});
17+
} );
1818

19-
QUnit.config.urlConfig.push({
19+
QUnit.config.urlConfig.push( {
2020
id: "jquery",
2121
label: "jQuery version",
2222
value: [
@@ -30,7 +30,7 @@ QUnit.config.urlConfig.push({
3030
"compat-git", "git", "custom"
3131
],
3232
tooltip: "Which jQuery Core version to test against"
33-
});
33+
} );
3434

3535
QUnit.reset = ( function( reset ) {
3636
return function() {

0 commit comments

Comments
 (0)