mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
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
This commit is contained in:
@@ -38,7 +38,7 @@ this.q = function() {
|
||||
* @example t("Check for something", "//[a]", ["foo", "baar"]);
|
||||
* @result returns true if "//[a]" return two elements with the IDs 'foo' and 'baar'
|
||||
*/
|
||||
this.t = function( a, b, c ) {
|
||||
QUnit.assert.t = function( a, b, c ) {
|
||||
var f = jQuery( b ).get(),
|
||||
s = "",
|
||||
i = 0;
|
||||
@@ -47,7 +47,7 @@ this.t = function( a, b, c ) {
|
||||
s += ( s && "," ) + '"' + f[ i ].id + '"';
|
||||
}
|
||||
|
||||
deepEqual( f, q.apply( q, c ), a + " (" + b + ")" );
|
||||
this.deepEqual( f, q.apply( q, c ), a + " (" + b + ")" );
|
||||
};
|
||||
|
||||
this.createDashboardXML = function() {
|
||||
@@ -199,7 +199,7 @@ this.ajaxTest = function( title, expect, options ) {
|
||||
if ( !completed ) {
|
||||
completed = true;
|
||||
delete ajaxTest.abort;
|
||||
ok( false, "aborted " + reason );
|
||||
assert.ok( false, "aborted " + reason );
|
||||
jQuery.each( requests, function( i, request ) {
|
||||
request.abort();
|
||||
} );
|
||||
|
||||
Reference in New Issue
Block a user