diff options
Diffstat (limited to 'tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js')
-rw-r--r-- | tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js b/tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js index 98ff5508..161f0cd1 100644 --- a/tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js @@ -1,15 +1,6 @@ -module( 'jquery.tabIndex', QUnit.newMwEnvironment() ); - -test( '-- Initial check', function() { - expect(2); - - ok( $.fn.firstTabIndex, '$.fn.firstTabIndex defined' ); - ok( $.fn.lastTabIndex, '$.fn.lastTabIndex defined' ); -}); - -test( 'firstTabIndex', function() { - expect(2); +QUnit.module( 'jquery.tabIndex', QUnit.newMwEnvironment() ); +QUnit.test( 'firstTabIndex', 2, function ( assert ) { var testEnvironment = '<form>' + '<input tabindex="7" />' + @@ -19,15 +10,13 @@ test( 'firstTabIndex', function() { '</form>'; var $testA = $( '<div>' ).html( testEnvironment ).appendTo( '#qunit-fixture' ); - strictEqual( $testA.firstTabIndex(), 2, 'First tabindex should be 2 within this context.' ); + assert.strictEqual( $testA.firstTabIndex(), 2, 'First tabindex should be 2 within this context.' ); var $testB = $( '<div>' ); - strictEqual( $testB.firstTabIndex(), null, 'Return null if none available.' ); + assert.strictEqual( $testB.firstTabIndex(), null, 'Return null if none available.' ); }); -test( 'lastTabIndex', function() { - expect(2); - +QUnit.test( 'lastTabIndex', 2, function ( assert ) { var testEnvironment = '<form>' + '<input tabindex="7" />' + @@ -37,8 +26,8 @@ test( 'lastTabIndex', function() { '</form>'; var $testA = $( '<div>' ).html( testEnvironment ).appendTo( '#qunit-fixture' ); - strictEqual( $testA.lastTabIndex(), 9, 'Last tabindex should be 9 within this context.' ); + assert.strictEqual( $testA.lastTabIndex(), 9, 'Last tabindex should be 9 within this context.' ); var $testB = $( '<div>' ); - strictEqual( $testB.lastTabIndex(), null, 'Return null if none available.' ); + assert.strictEqual( $testB.lastTabIndex(), null, 'Return null if none available.' ); }); |