Tests: further improvements QUnit 2.0 migration

* Remove QUnit jshint globals
* Extend QUnit.assert methods
* Use assert.async instead of start/stop/done

Ref b930d14ce6
Ref c8d15a2f9f
This commit is contained in:
Oleg Gaidarenko
2015-09-08 03:26:29 +03:00
parent f71e32d4b4
commit 2f0cedc997
16 changed files with 284 additions and 262 deletions

View File

@@ -1266,7 +1266,7 @@ var testToggleClass = function( valueObj, assert ) {
// Cleanup
e.removeClass( "testD" );
QUnit.expectJqData( this, e[ 0 ], "__className__" );
assert.expectJqData( this, e[ 0 ], "__className__" );
};
QUnit.test( "toggleClass(String|boolean|undefined[, boolean])", function( assert ) {
@@ -1469,7 +1469,7 @@ QUnit.test( "option value not trimmed when setting via parent select", function(
} );
QUnit.test( "Insignificant white space returned for $(option).val() (#14858)", function( assert ) {
expect ( 3 );
assert.expect( 3 );
var val = jQuery( "<option></option>" ).val();
assert.equal( val.length, 0, "Empty option should have no value" );