mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Tests: more style corrections
Provocated by jscs-dev/node-jscs@2de68c0
Ref c161eecce0
This commit is contained in:
parent
2f0cedc997
commit
d8b7e7b0bd
@ -792,7 +792,7 @@ QUnit.module( "ajax", {
|
||||
);
|
||||
}
|
||||
|
||||
jQuery.ajax({
|
||||
jQuery.ajax( {
|
||||
url: "data/jsonp.php",
|
||||
dataType: "jsonp",
|
||||
crossDomain: crossDomain,
|
||||
@ -800,7 +800,7 @@ QUnit.module( "ajax", {
|
||||
assert.strictEqual( this.jsonpCallback, previous.callback, "JSONP callback name is re-used" );
|
||||
return false;
|
||||
}
|
||||
});
|
||||
} );
|
||||
}
|
||||
};
|
||||
} );
|
||||
@ -1549,7 +1549,7 @@ QUnit.module( "ajax", {
|
||||
assert.ok( false, "error" );
|
||||
}
|
||||
};
|
||||
});
|
||||
} );
|
||||
}
|
||||
|
||||
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()
|
||||
|
||||
ajaxTest( "jQuery.ajaxPrefilter() - abort", 1, function( assert ) {
|
||||
|
@ -1373,7 +1373,7 @@ QUnit.test( "jQuery.parseHTML", function( assert ) {
|
||||
|
||||
if ( jQuery.support.createHTMLDocument ) {
|
||||
QUnit.asyncTest( "jQuery.parseHTML", function( assert ) {
|
||||
assert.expect ( 1 );
|
||||
assert.expect( 1 );
|
||||
|
||||
Globals.register( "parseHTMLError" );
|
||||
|
||||
|
@ -535,8 +535,8 @@ QUnit.test( "data-* attributes", function( assert ) {
|
||||
child.data( "notjson" ), " {}",
|
||||
"JSON object with leading non-JSON read from attribute as string" );
|
||||
assert.strictEqual(
|
||||
child.data("notjson2"), "[] ",
|
||||
"JSON array with trailing non-JSON read from attribute as string");
|
||||
child.data( "notjson2" ), "[] ",
|
||||
"JSON array with trailing non-JSON read from attribute as string" );
|
||||
assert.strictEqual(
|
||||
child.data( "empty" ), "", "Empty string read from attribute"
|
||||
);
|
||||
@ -1128,8 +1128,9 @@ QUnit.test( ".data(prop) does not create expando", function( assert ) {
|
||||
var key,
|
||||
div = jQuery( "<div/>" );
|
||||
|
||||
div.data("foo");
|
||||
assert.equal( false, jQuery.hasData( div[0] ) );
|
||||
div.data( "foo" );
|
||||
assert.equal( false, jQuery.hasData( div[ 0 ] ) );
|
||||
|
||||
// Make sure no expando has been added
|
||||
for ( key in div[ 0 ] ) {
|
||||
if ( /^jQuery/.test( key ) ) {
|
||||
|
4
test/unit/effects.js
vendored
4
test/unit/effects.js
vendored
@ -1849,7 +1849,7 @@ QUnit.test( "non-px animation handles non-numeric start (#11971)", function( ass
|
||||
this.clock.tick( 10 );
|
||||
} );
|
||||
|
||||
QUnit.test("Animation callbacks (#11797)", function( assert ) {
|
||||
QUnit.test( "Animation callbacks (#11797)", function( assert ) {
|
||||
assert.expect( 16 );
|
||||
|
||||
var prog = 0,
|
||||
@ -1970,7 +1970,7 @@ QUnit.test( "Animation callbacks in order (#2292)", function( assert ) {
|
||||
always: function() {
|
||||
assert.step( 5 );
|
||||
}
|
||||
}).finish();
|
||||
} ).finish();
|
||||
|
||||
this.clock.tick( dur + 10 );
|
||||
} );
|
||||
|
@ -2515,7 +2515,7 @@ testIframeWithCallback(
|
||||
var input = jQuery( frameDoc ).find( "#frame-input" );
|
||||
|
||||
// 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" );
|
||||
} );
|
||||
|
||||
|
@ -99,11 +99,11 @@ function testText( valueObj, assert ) {
|
||||
}
|
||||
|
||||
QUnit.test( "text(String)", function( assert ) {
|
||||
testText(manipulationBareObj, assert );
|
||||
testText( manipulationBareObj, assert );
|
||||
} );
|
||||
|
||||
QUnit.test( "text(Function)", function( assert ) {
|
||||
testText(manipulationFunctionReturningObj, assert );
|
||||
testText( manipulationFunctionReturningObj, assert );
|
||||
} );
|
||||
|
||||
QUnit.test( "text(Function) with incoming value", function( assert ) {
|
||||
@ -198,8 +198,8 @@ function testAppend( valueObj, assert ) {
|
||||
|
||||
assert.expect( 78 );
|
||||
|
||||
testAppendForObject( valueObj,false, assert );
|
||||
testAppendForObject( valueObj,true, assert );
|
||||
testAppendForObject( valueObj, false, assert );
|
||||
testAppendForObject( valueObj, true, assert );
|
||||
|
||||
var defaultText, result, message, iframe, iframeDoc, j, d,
|
||||
$input, $radioChecked, $radioUnchecked, $radioParent, $map, $table;
|
||||
@ -306,11 +306,11 @@ function testAppend( valueObj, assert ) {
|
||||
}
|
||||
|
||||
QUnit.test( "append(String|Element|Array<Element>|jQuery)", function( assert ) {
|
||||
testAppend(manipulationBareObj, assert );
|
||||
testAppend( manipulationBareObj, assert );
|
||||
} );
|
||||
|
||||
QUnit.test( "append(Function)", function( assert ) {
|
||||
testAppend(manipulationFunctionReturningObj, assert );
|
||||
testAppend( manipulationFunctionReturningObj, assert );
|
||||
} );
|
||||
|
||||
QUnit.test( "append(param) to object, see #11280", function( assert ) {
|
||||
|
Loading…
Reference in New Issue
Block a user