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
// Restore warnings
mw.log.warn = warn;
warn = undefined;
- });
+ } );
QUnit.done( function () {
that.populateMissingTests();
var elItem = document.createElement( 'li' );
elItem.textContent = key;
elList.appendChild( elItem );
- });
+ } );
elFoot = document.createElement( 'p' );
elFoot.innerHTML = '<em>— CompletenessTest</em>';
elOutputWrapper.appendChild( elContainer );
util.each( style, function ( key, value ) {
- elOutputWrapper.style[key] = value;
- });
+ elOutputWrapper.style[ key ] = value;
+ } );
return elOutputWrapper;
}
if ( toolbar ) {
toolbar.insertBefore( testResults, toolbar.firstChild );
}
- });
+ } );
return this;
}
if ( currName ) {
currPathArray.push( currName );
- currVal = currObj[currName];
+ currVal = currObj[ currName ];
} else {
currName = '(root)';
currVal = currObj;
var ct = this;
util.each( ct.injectionTracker, function ( key ) {
ct.hasTest( key );
- });
+ } );
},
/**
*/
hasTest: function ( fnName ) {
if ( !( fnName in this.methodCallTracker ) ) {
- this.missingTests[fnName] = true;
+ this.missingTests[ fnName ] = true;
return false;
}
return true;
// 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;