mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Build: Acknowledge Android 2.3 is not ES5-compatible
Android 2.3 chokes on unquoted reserved words being used as property names which was making Deferred tests not run. Acknowledge the sad fact that Android 2.3 is not ES5-compliant browser and enable the "es3" option in JSHint config. Fixes gh-2478 Closes gh-2481
This commit is contained in:
parent
bf591fb597
commit
1c59b308d2
@ -12,8 +12,11 @@
|
|||||||
|
|
||||||
"sub": true,
|
"sub": true,
|
||||||
|
|
||||||
|
"es3": true,
|
||||||
|
|
||||||
"globals": {
|
"globals": {
|
||||||
"window": true,
|
"window": true,
|
||||||
|
"JSON": false,
|
||||||
|
|
||||||
"jQuery": true,
|
"jQuery": true,
|
||||||
"define": true,
|
"define": true,
|
||||||
|
@ -10,6 +10,8 @@
|
|||||||
"undef": true,
|
"undef": true,
|
||||||
"unused": true,
|
"unused": true,
|
||||||
|
|
||||||
|
"es3": true,
|
||||||
|
|
||||||
"evil": true,
|
"evil": true,
|
||||||
"sub": true,
|
"sub": true,
|
||||||
|
|
||||||
@ -21,6 +23,7 @@
|
|||||||
"require": false,
|
"require": false,
|
||||||
"define": false,
|
"define": false,
|
||||||
"DOMParser": false,
|
"DOMParser": false,
|
||||||
|
"JSON": false,
|
||||||
"Promise": false,
|
"Promise": false,
|
||||||
"Symbol": false,
|
"Symbol": false,
|
||||||
"QUnit": false,
|
"QUnit": false,
|
||||||
|
@ -1400,7 +1400,7 @@ test("jQuery.parseJSON", function() {
|
|||||||
deepEqual(
|
deepEqual(
|
||||||
jQuery.parseJSON( "{ \"string\": \"\", \"number\": 4.2e+1, \"object\": {}," +
|
jQuery.parseJSON( "{ \"string\": \"\", \"number\": 4.2e+1, \"object\": {}," +
|
||||||
"\"array\": [[]], \"boolean\": [ true, false ], \"null\": null }"),
|
"\"array\": [[]], \"boolean\": [ true, false ], \"null\": null }"),
|
||||||
{ string: "", number: 42, object: {}, array: [[]], boolean: [ true, false ], "null": null },
|
{ string: "", number: 42, object: {}, array: [[]], "boolean": [ true, false ], "null": null },
|
||||||
"Dictionary of all data types"
|
"Dictionary of all data types"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1225,7 +1225,7 @@ test( "Do not throw on frame elements from css method (#15098)", 1, function() {
|
|||||||
if ( transformName ) {
|
if ( transformName ) {
|
||||||
equal( elemStyle[ transformName ], transformVal, "setting properly-prefixed transform" );
|
equal( elemStyle[ transformName ], transformVal, "setting properly-prefixed transform" );
|
||||||
}
|
}
|
||||||
equal( elemStyle.undefined, undefined, "Nothing writes to node.style.undefined" );
|
equal( elemStyle[ "undefined" ], undefined, "Nothing writes to node.style.undefined" );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
test( "Don't detect fake set properties on a node when caching the prefixed version", function() {
|
test( "Don't detect fake set properties on a node when caching the prefixed version", function() {
|
||||||
|
@ -172,7 +172,7 @@ test( "jQuery.Deferred.catch", function( assert ) {
|
|||||||
|
|
||||||
var value1, value2, value3,
|
var value1, value2, value3,
|
||||||
defer = jQuery.Deferred(),
|
defer = jQuery.Deferred(),
|
||||||
piped = defer.catch(function( a, b ) {
|
piped = defer[ "catch" ](function( a, b ) {
|
||||||
return a * b;
|
return a * b;
|
||||||
}),
|
}),
|
||||||
done = jQuery.map( new Array( 3 ), function() { return assert.async(); } );
|
done = jQuery.map( new Array( 3 ), function() { return assert.async(); } );
|
||||||
@ -186,18 +186,18 @@ test( "jQuery.Deferred.catch", function( assert ) {
|
|||||||
value2 = b;
|
value2 = b;
|
||||||
});
|
});
|
||||||
|
|
||||||
defer.reject( 2, 3 ).catch(function() {
|
defer.reject( 2, 3 )[ "catch" ](function() {
|
||||||
assert.strictEqual( value1, 2, "first reject value ok" );
|
assert.strictEqual( value1, 2, "first reject value ok" );
|
||||||
assert.strictEqual( value2, 3, "second reject value ok" );
|
assert.strictEqual( value2, 3, "second reject value ok" );
|
||||||
assert.strictEqual( value3, 6, "result of filter ok" );
|
assert.strictEqual( value3, 6, "result of filter ok" );
|
||||||
done.pop().call();
|
done.pop().call();
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery.Deferred().resolve().catch(function() {
|
jQuery.Deferred().resolve()[ "catch" ](function() {
|
||||||
assert.ok( false, "then should not be called on resolve" );
|
assert.ok( false, "then should not be called on resolve" );
|
||||||
}).then( done.pop() );
|
}).then( done.pop() );
|
||||||
|
|
||||||
jQuery.Deferred().reject().catch( jQuery.noop ).done(function( value ) {
|
jQuery.Deferred().reject()[ "catch" ]( jQuery.noop ).done(function( value ) {
|
||||||
assert.strictEqual( value, undefined, "then fail callback can return undefined/null" );
|
assert.strictEqual( value, undefined, "then fail callback can return undefined/null" );
|
||||||
done.pop().call();
|
done.pop().call();
|
||||||
});
|
});
|
||||||
|
2
test/unit/effects.js
vendored
2
test/unit/effects.js
vendored
@ -1579,7 +1579,7 @@ test("Initial step callback should show element as :animated (#14623)", 1, funct
|
|||||||
var foo = jQuery( "#foo" );
|
var foo = jQuery( "#foo" );
|
||||||
|
|
||||||
foo.animate({
|
foo.animate({
|
||||||
opacity: 0,
|
opacity: 0
|
||||||
}, {
|
}, {
|
||||||
duration: 100,
|
duration: 100,
|
||||||
step: function() {
|
step: function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user