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

@@ -60,14 +60,14 @@ testIframeWithCallback(
"Check CSP (https://developer.mozilla.org/en-US/docs/Security/CSP) restrictions",
"support/csp.php",
function( support, assert ) {
var done = assert.async();
assert.expect( 2 );
assert.deepEqual( jQuery.extend( {}, support ), computedSupport, "No violations of CSP polices" );
QUnit.stop();
supportjQuery.get( "data/support/csp.log" ).done( function( data ) {
assert.equal( data, "", "No log request should be sent" );
supportjQuery.get( "data/support/csp-clean.php" ).done( start );
supportjQuery.get( "data/support/csp-clean.php" ).done( done );
} );
}
);