Skip to content

Commit 24d978f

Browse files
committed
Core tests: Coding standards.
1 parent eb9804b commit 24d978f

File tree

1 file changed

+25
-30
lines changed

1 file changed

+25
-30
lines changed

tests/unit/core/core.js

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,44 @@
1-
/*
2-
* core unit tests
3-
*/
4-
(function($) {
1+
(function( $ ) {
52

6-
module('core - jQuery extensions');
3+
module( "core - jQuery extensions" );
74

8-
test('focus - original functionality', function() {
9-
expect(1);
10-
11-
$('#inputTabindex0')
5+
test( "focus - original functionality", function() {
6+
expect( 1 );
7+
$( "#inputTabindex0" )
128
.focus(function() {
13-
ok(true, 'event triggered');
9+
ok( true, "event triggered" );
1410
})
1511
.focus();
1612
});
1713

18-
asyncTest('focus', function() {
19-
expect(2);
20-
$('#inputTabindex0')
14+
asyncTest( "focus", function() {
15+
expect( 2 );
16+
$( "#inputTabindex0" )
2117
.focus(function() {
22-
ok(true, 'event triggered');
18+
ok( true, "event triggered" );
2319
})
24-
.focus(500, function() {
25-
ok(true, 'callback triggered');
26-
$(this).unbind('focus');
20+
.focus( 500, function() {
21+
ok( true, "callback triggered" );
2722
start();
2823
});
2924
});
3025

31-
test('zIndex', function() {
32-
var el = $('#zIndexAutoWithParent'),
26+
test( "zIndex", function() {
27+
var el = $( "#zIndexAutoWithParent" ),
3328
parent = el.parent();
34-
equal(el.zIndex(), 100, 'zIndex traverses up to find value');
35-
equal(parent.zIndex(200), parent, 'zIndex setter is chainable');
36-
equal(el.zIndex(), 200, 'zIndex setter changed zIndex');
29+
equal( el.zIndex(), 100, "zIndex traverses up to find value" );
30+
equal( parent.zIndex(200 ), parent, "zIndex setter is chainable" );
31+
equal( el.zIndex(), 200, "zIndex setter changed zIndex" );
3732

38-
el = $('#zIndexAutoWithParentViaCSS');
39-
equal(el.zIndex(), 0, 'zIndex traverses up to find CSS value, not found because not positioned');
33+
el = $( "#zIndexAutoWithParentViaCSS" );
34+
equal( el.zIndex(), 0, "zIndex traverses up to find CSS value, not found because not positioned" );
4035

41-
el = $('#zIndexAutoWithParentViaCSSPositioned');
42-
equal(el.zIndex(), 100, 'zIndex traverses up to find CSS value');
43-
el.parent().zIndex(200);
44-
equal(el.zIndex(), 200, 'zIndex setter changed zIndex, overriding CSS');
36+
el = $( "#zIndexAutoWithParentViaCSSPositioned" );
37+
equal( el.zIndex(), 100, "zIndex traverses up to find CSS value" );
38+
el.parent().zIndex( 200 );
39+
equal( el.zIndex(), 200, "zIndex setter changed zIndex, overriding CSS" );
4540

46-
equal($('#zIndexAutoNoParent').zIndex(), 0, 'zIndex never explicitly set in hierarchy');
41+
equal( $( "#zIndexAutoNoParent" ).zIndex(), 0, "zIndex never explicitly set in hierarchy" );
4742
});
4843

4944
test( "innerWidth - getter", function() {
@@ -154,4 +149,4 @@ test( "outerHeight(true) - setter", function() {
154149
equal( el.height(), 32, "height set properly when hidden" );
155150
});
156151

157-
})(jQuery);
152+
})( jQuery );

0 commit comments

Comments
 (0)