X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fjquery%2Fjquery.qunit.completenessTest.js;h=e34592cb148c2c6f2dc4c6babb1e46c6a82a68ff;hb=aceff2e778270345fa4bebf536d70fe278712885;hp=8d38401eb9a1d913de95033c5feda132b24326e3;hpb=01da3da43d18b123fe3679a6af21f046a78180d5;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/jquery/jquery.qunit.completenessTest.js b/resources/src/jquery/jquery.qunit.completenessTest.js index 8d38401eb9..e34592cb14 100644 --- a/resources/src/jquery/jquery.qunit.completenessTest.js +++ b/resources/src/jquery/jquery.qunit.completenessTest.js @@ -17,8 +17,8 @@ var util, hasOwn = Object.prototype.hasOwnProperty, - log = (window.console && window.console.log) - ? function () { return window.console.log.apply(window.console, arguments); } + log = ( window.console && window.console.log ) + ? function () { return window.console.log.apply( window.console, arguments ); } : function () {}; // Simplified version of a few jQuery methods, except that they don't @@ -91,7 +91,7 @@ // Restore warnings mw.log.warn = warn; warn = undefined; - }); + } ); QUnit.done( function () { that.populateMissingTests(); @@ -114,7 +114,7 @@ var elItem = document.createElement( 'li' ); elItem.textContent = key; elList.appendChild( elItem ); - }); + } ); elFoot = document.createElement( 'p' ); elFoot.innerHTML = '— CompletenessTest'; @@ -132,8 +132,8 @@ elOutputWrapper.appendChild( elContainer ); util.each( style, function ( key, value ) { - elOutputWrapper.style[key] = value; - }); + elOutputWrapper.style[ key ] = value; + } ); return elOutputWrapper; } @@ -171,7 +171,7 @@ if ( toolbar ) { toolbar.insertBefore( testResults, toolbar.firstChild ); } - }); + } ); return this; } @@ -201,7 +201,7 @@ if ( currName ) { currPathArray.push( currName ); - currVal = currObj[currName]; + currVal = currObj[ currName ]; } else { currName = '(root)'; currVal = currObj; @@ -248,7 +248,7 @@ var ct = this; util.each( ct.injectionTracker, function ( key ) { ct.hasTest( key ); - }); + } ); }, /** @@ -263,7 +263,7 @@ */ hasTest: function ( fnName ) { if ( !( fnName in this.methodCallTracker ) ) { - this.missingTests[fnName] = true; + this.missingTests[ fnName ] = true; return false; } return true; @@ -291,8 +291,11 @@ // Make the spy inherit from the original so that its static methods are also // visible in the spy (e.g. when we inject a check into mw.log, mw.log.warn // must remain accessible). + // XXX: https://github.com/jshint/jshint/issues/2656 + /*jshint ignore:start */ /*jshint proto:true */ spy.__proto__ = val; + /*jshint ignore:end */ // Objects are by reference, members (unless objects) are not. obj[ key ] = spy;