aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/core.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/core.js')
-rw-r--r--test/unit/core.js23
1 files changed, 11 insertions, 12 deletions
diff --git a/test/unit/core.js b/test/unit/core.js
index 57c8dd9e9..8ad3c86ce 100644
--- a/test/unit/core.js
+++ b/test/unit/core.js
@@ -95,7 +95,7 @@ QUnit.test( "jQuery()", function( assert ) {
assert.equal( div.length, 4, "Correct number of elements generated for div hr code b" );
assert.equal( div.parent().length, 0, "Make sure that the generated HTML has no parent." );
- assert.equal( jQuery( [ 1,2,3 ] ).get( 1 ), 2, "Test passing an array to the factory" );
+ assert.equal( jQuery( [ 1, 2, 3 ] ).get( 1 ), 2, "Test passing an array to the factory" );
assert.equal( jQuery( document.body ).get( 0 ), jQuery( "body" ).get( 0 ), "Test passing an html node to the factory" );
@@ -274,7 +274,7 @@ QUnit.test( "type", function( assert ) {
QUnit.test( "type for `Symbol`", function( assert ) {
// Prevent reference errors
- if( typeof Symbol !== "function" ) {
+ if ( typeof Symbol !== "function" ) {
assert.expect( 0 );
return;
}
@@ -283,7 +283,7 @@ QUnit.test( "type for `Symbol`", function( assert ) {
assert.equal( jQuery.type( Symbol() ), "symbol", "Symbol" );
assert.equal( jQuery.type( Object( Symbol() ) ), "symbol", "Symbol" );
-});
+} );
QUnit.asyncTest( "isPlainObject", function( assert ) {
@@ -968,7 +968,7 @@ QUnit.test( "jQuery.map", function( assert ) {
assert.ok( !result, "empty NodeList treated like array" );
result = jQuery.map( Array( 4 ), function( v, k ) {
- return k % 2 ? k : [ k,k,k ];
+ return k % 2 ? k : [ k, k, k ];
} );
assert.equal( result.join( "" ), "00012223", "Array results flattened (#2616)" );
} );
@@ -1120,7 +1120,7 @@ QUnit.test( "jQuery.grep(Array-like)", function( assert ) {
[],
"Satisfying elements absent, Array-like object used, and grep explicitly uninverted"
);
-});
+} );
QUnit.test( "jQuery.extend(Object, Object)", function( assert ) {
assert.expect( 28 );
@@ -1238,19 +1238,19 @@ QUnit.test( "jQuery.extend(Object, Object)", function( assert ) {
QUnit.test( "jQuery.extend(Object, Object {created with \"defineProperties\"})", function( assert ) {
assert.expect( 2 );
- var definedObj = Object.defineProperties({}, {
+ var definedObj = Object.defineProperties( {}, {
"enumerableProp": {
- get: function () {
+ get: function() {
return true;
},
enumerable: true
},
"nonenumerableProp": {
- get: function () {
+ get: function() {
return true;
}
}
- }),
+ } ),
accessorObj = {};
jQuery.extend( accessorObj, definedObj );
@@ -1308,7 +1308,7 @@ QUnit.test( "jQuery.each(Object,Function)", function( assert ) {
assert.deepEqual( seen, [ 1, 2 ], "Broken array iteration" );
seen = [];
- jQuery.each( { "a": 1, "b": 2,"c": 3 }, function( k, v ) {
+ jQuery.each( { "a": 1, "b": 2, "c": 3 }, function( k, v ) {
seen.push( v );
return false;
} );
@@ -1428,7 +1428,7 @@ QUnit.test( "jQuery.makeArray", function( assert ) {
assert.equal( ( function() { return jQuery.makeArray( arguments ); } )( 1, 2 ).join( "" ), "12", "Pass makeArray an arguments array" );
- assert.equal( jQuery.makeArray( [ 1,2,3 ] ).join( "" ), "123", "Pass makeArray a real array" );
+ assert.equal( jQuery.makeArray( [ 1, 2, 3 ] ).join( "" ), "123", "Pass makeArray a real array" );
assert.equal( jQuery.makeArray().length, 0, "Pass nothing to makeArray and expect an empty array" );
@@ -1692,7 +1692,6 @@ testIframe(
);
QUnit.test( "Iterability of jQuery objects (gh-1693)", function( assert ) {
- /* jshint unused: false */
assert.expect( 1 );
var i, elem, result;