aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/tabs/helper.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/tabs/helper.js')
-rw-r--r--tests/unit/tabs/helper.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/unit/tabs/helper.js b/tests/unit/tabs/helper.js
index 8c102ec60..b3fb1d6fd 100644
--- a/tests/unit/tabs/helper.js
+++ b/tests/unit/tabs/helper.js
@@ -5,7 +5,7 @@ define( [
], function( $, helper ) {
return $.extend( helper, {
- disabled: function( tabs, state ) {
+ disabled: function( assert, tabs, state ) {
var expected, actual,
internalState = tabs.tabs( "option", "disabled" );
@@ -18,7 +18,7 @@ return $.extend( helper, {
} );
}
- expected = $.map( new Array( tabs.find ( ".ui-tabs-nav li" ).length ), function( _, index ) {
+ expected = $.map( new Array( tabs.find( ".ui-tabs-nav li" ).length ), function( _, index ) {
if ( typeof state === "boolean" ) {
return state ? 1 : 0;
} else {
@@ -37,25 +37,25 @@ return $.extend( helper, {
return 0;
}
- // mixed state - invalid
+ // Mixed state - invalid
return -1;
} ).get();
- deepEqual( tabs.tabs( "option", "disabled" ), state );
- deepEqual( actual, expected );
+ assert.deepEqual( tabs.tabs( "option", "disabled" ), state );
+ assert.deepEqual( actual, expected );
},
- equalHeight: function( tabs, height ) {
+ equalHeight: function( assert, tabs, height ) {
tabs.find( ".ui-tabs-panel" ).each( function() {
// Handle overly-precise values
var actualHeight = parseFloat( $( this ).outerHeight().toFixed( 1 ) );
- equal( actualHeight, height );
+ assert.equal( actualHeight, height );
} );
},
- state: function( tabs ) {
- var expected = $.makeArray( arguments ).slice( 1 ),
+ state: function( assert, tabs ) {
+ var expected = $.makeArray( arguments ).slice( 2 ),
actual = tabs.find( ".ui-tabs-nav li" ).map( function() {
var tab = $( this ),
panel = $( $.ui.tabs.prototype._sanitizeSelector(
@@ -69,9 +69,9 @@ return $.extend( helper, {
if ( !tabIsActive && !panelIsActive ) {
return 0;
}
- return -1; // mixed state - invalid
+ return -1; // Mixed state - invalid
} ).get();
- deepEqual( actual, expected );
+ assert.deepEqual( actual, expected );
}
} );