|
1 | | -/* |
2 | | - * core unit tests |
3 | | - */ |
4 | | -(function($) { |
| 1 | +(function( $ ) { |
5 | 2 |
|
6 | | -module('core - jQuery extensions'); |
| 3 | +module( "core - jQuery extensions" ); |
7 | 4 |
|
8 | | -test('focus - original functionality', function() { |
9 | | - expect(1); |
10 | | - |
11 | | - $('#inputTabindex0') |
| 5 | +test( "focus - original functionality", function() { |
| 6 | + expect( 1 ); |
| 7 | + $( "#inputTabindex0" ) |
12 | 8 | .focus(function() { |
13 | | - ok(true, 'event triggered'); |
| 9 | + ok( true, "event triggered" ); |
14 | 10 | }) |
15 | 11 | .focus(); |
16 | 12 | }); |
17 | 13 |
|
18 | | -asyncTest('focus', function() { |
19 | | - expect(2); |
20 | | - $('#inputTabindex0') |
| 14 | +asyncTest( "focus", function() { |
| 15 | + expect( 2 ); |
| 16 | + $( "#inputTabindex0" ) |
21 | 17 | .focus(function() { |
22 | | - ok(true, 'event triggered'); |
| 18 | + ok( true, "event triggered" ); |
23 | 19 | }) |
24 | | - .focus(500, function() { |
25 | | - ok(true, 'callback triggered'); |
26 | | - $(this).unbind('focus'); |
| 20 | + .focus( 500, function() { |
| 21 | + ok( true, "callback triggered" ); |
27 | 22 | start(); |
28 | 23 | }); |
29 | 24 | }); |
30 | 25 |
|
31 | | -test('zIndex', function() { |
32 | | - var el = $('#zIndexAutoWithParent'), |
| 26 | +test( "zIndex", function() { |
| 27 | + var el = $( "#zIndexAutoWithParent" ), |
33 | 28 | 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" ); |
37 | 32 |
|
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" ); |
40 | 35 |
|
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" ); |
45 | 40 |
|
46 | | - equal($('#zIndexAutoNoParent').zIndex(), 0, 'zIndex never explicitly set in hierarchy'); |
| 41 | + equal( $( "#zIndexAutoNoParent" ).zIndex(), 0, "zIndex never explicitly set in hierarchy" ); |
47 | 42 | }); |
48 | 43 |
|
49 | 44 | test( "innerWidth - getter", function() { |
@@ -154,4 +149,4 @@ test( "outerHeight(true) - setter", function() { |
154 | 149 | equal( el.height(), 32, "height set properly when hidden" ); |
155 | 150 | }); |
156 | 151 |
|
157 | | -})(jQuery); |
| 152 | +})( jQuery ); |
0 commit comments