Tests: more style corrections

Provocated by jscs-dev/node-jscs@2de68c0

Ref c161eecce0
This commit is contained in:
Oleg Gaidarenko 2015-09-08 04:02:51 +03:00
parent 2f0cedc997
commit d8b7e7b0bd
6 changed files with 18 additions and 19 deletions

View File

@ -792,7 +792,7 @@ QUnit.module( "ajax", {
); );
} }
jQuery.ajax({ jQuery.ajax( {
url: "data/jsonp.php", url: "data/jsonp.php",
dataType: "jsonp", dataType: "jsonp",
crossDomain: crossDomain, crossDomain: crossDomain,
@ -800,7 +800,7 @@ QUnit.module( "ajax", {
assert.strictEqual( this.jsonpCallback, previous.callback, "JSONP callback name is re-used" ); assert.strictEqual( this.jsonpCallback, previous.callback, "JSONP callback name is re-used" );
return false; return false;
} }
}); } );
} }
}; };
} ); } );
@ -1549,7 +1549,7 @@ QUnit.module( "ajax", {
assert.ok( false, "error" ); assert.ok( false, "error" );
} }
}; };
}); } );
} }
ajaxTest( "#14683 - jQuery.ajax() - Exceptions thrown synchronously by xhr.send should be caught", 4, function( assert ) { ajaxTest( "#14683 - jQuery.ajax() - Exceptions thrown synchronously by xhr.send should be caught", 4, function( assert ) {
@ -1582,8 +1582,6 @@ QUnit.module( "ajax", {
} }
); );
// //----------- jQuery.ajaxPrefilter() // //----------- jQuery.ajaxPrefilter()
ajaxTest( "jQuery.ajaxPrefilter() - abort", 1, function( assert ) { ajaxTest( "jQuery.ajaxPrefilter() - abort", 1, function( assert ) {

View File

@ -1373,7 +1373,7 @@ QUnit.test( "jQuery.parseHTML", function( assert ) {
if ( jQuery.support.createHTMLDocument ) { if ( jQuery.support.createHTMLDocument ) {
QUnit.asyncTest( "jQuery.parseHTML", function( assert ) { QUnit.asyncTest( "jQuery.parseHTML", function( assert ) {
assert.expect ( 1 ); assert.expect( 1 );
Globals.register( "parseHTMLError" ); Globals.register( "parseHTMLError" );

View File

@ -535,8 +535,8 @@ QUnit.test( "data-* attributes", function( assert ) {
child.data( "notjson" ), " {}", child.data( "notjson" ), " {}",
"JSON object with leading non-JSON read from attribute as string" ); "JSON object with leading non-JSON read from attribute as string" );
assert.strictEqual( assert.strictEqual(
child.data("notjson2"), "[] ", child.data( "notjson2" ), "[] ",
"JSON array with trailing non-JSON read from attribute as string"); "JSON array with trailing non-JSON read from attribute as string" );
assert.strictEqual( assert.strictEqual(
child.data( "empty" ), "", "Empty string read from attribute" child.data( "empty" ), "", "Empty string read from attribute"
); );
@ -1128,8 +1128,9 @@ QUnit.test( ".data(prop) does not create expando", function( assert ) {
var key, var key,
div = jQuery( "<div/>" ); div = jQuery( "<div/>" );
div.data("foo"); div.data( "foo" );
assert.equal( false, jQuery.hasData( div[0] ) ); assert.equal( false, jQuery.hasData( div[ 0 ] ) );
// Make sure no expando has been added // Make sure no expando has been added
for ( key in div[ 0 ] ) { for ( key in div[ 0 ] ) {
if ( /^jQuery/.test( key ) ) { if ( /^jQuery/.test( key ) ) {

View File

@ -1849,7 +1849,7 @@ QUnit.test( "non-px animation handles non-numeric start (#11971)", function( ass
this.clock.tick( 10 ); this.clock.tick( 10 );
} ); } );
QUnit.test("Animation callbacks (#11797)", function( assert ) { QUnit.test( "Animation callbacks (#11797)", function( assert ) {
assert.expect( 16 ); assert.expect( 16 );
var prog = 0, var prog = 0,
@ -1970,7 +1970,7 @@ QUnit.test( "Animation callbacks in order (#2292)", function( assert ) {
always: function() { always: function() {
assert.step( 5 ); assert.step( 5 );
} }
}).finish(); } ).finish();
this.clock.tick( dur + 10 ); this.clock.tick( dur + 10 );
} ); } );

View File

@ -2515,7 +2515,7 @@ testIframeWithCallback(
var input = jQuery( frameDoc ).find( "#frame-input" ); var input = jQuery( frameDoc ).find( "#frame-input" );
// Create a focusin handler on the parent; shouldn't affect the iframe's fate // Create a focusin handler on the parent; shouldn't affect the iframe's fate
jQuery ( "body" ).on( "focusin.iframeTest", function() { jQuery( "body" ).on( "focusin.iframeTest", function() {
assert.ok( false, "fired a focusin event in the parent document" ); assert.ok( false, "fired a focusin event in the parent document" );
} ); } );

View File

@ -99,11 +99,11 @@ function testText( valueObj, assert ) {
} }
QUnit.test( "text(String)", function( assert ) { QUnit.test( "text(String)", function( assert ) {
testText(manipulationBareObj, assert ); testText( manipulationBareObj, assert );
} ); } );
QUnit.test( "text(Function)", function( assert ) { QUnit.test( "text(Function)", function( assert ) {
testText(manipulationFunctionReturningObj, assert ); testText( manipulationFunctionReturningObj, assert );
} ); } );
QUnit.test( "text(Function) with incoming value", function( assert ) { QUnit.test( "text(Function) with incoming value", function( assert ) {
@ -198,8 +198,8 @@ function testAppend( valueObj, assert ) {
assert.expect( 78 ); assert.expect( 78 );
testAppendForObject( valueObj,false, assert ); testAppendForObject( valueObj, false, assert );
testAppendForObject( valueObj,true, assert ); testAppendForObject( valueObj, true, assert );
var defaultText, result, message, iframe, iframeDoc, j, d, var defaultText, result, message, iframe, iframeDoc, j, d,
$input, $radioChecked, $radioUnchecked, $radioParent, $map, $table; $input, $radioChecked, $radioUnchecked, $radioParent, $map, $table;
@ -306,11 +306,11 @@ function testAppend( valueObj, assert ) {
} }
QUnit.test( "append(String|Element|Array<Element>|jQuery)", function( assert ) { QUnit.test( "append(String|Element|Array<Element>|jQuery)", function( assert ) {
testAppend(manipulationBareObj, assert ); testAppend( manipulationBareObj, assert );
} ); } );
QUnit.test( "append(Function)", function( assert ) { QUnit.test( "append(Function)", function( assert ) {
testAppend(manipulationFunctionReturningObj, assert ); testAppend( manipulationFunctionReturningObj, assert );
} ); } );
QUnit.test( "append(param) to object, see #11280", function( assert ) { QUnit.test( "append(param) to object, see #11280", function( assert ) {