Krinkle has uploaded a new change for review.
https://gerrit.wikimedia.org/r/140652
Change subject: qunit.completenessTest: Suppress mw.log.warn in walkTheObject
......................................................................
qunit.completenessTest: Suppress mw.log.warn in walkTheObject
Lots of false positives where triggered for deprecation notices
while iterating over the object.
Change-Id: I710946062edd38b8d72ced6d67bd4bb7613246e3
---
M resources/src/jquery/jquery.qunit.completenessTest.js
1 file changed, 11 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/52/140652/1
diff --git a/resources/src/jquery/jquery.qunit.completenessTest.js
b/resources/src/jquery/jquery.qunit.completenessTest.js
index d6dfedd..294418c 100644
--- a/resources/src/jquery/jquery.qunit.completenessTest.js
+++ b/resources/src/jquery/jquery.qunit.completenessTest.js
@@ -12,7 +12,7 @@
*
* @author Timo Tijhof, 2011-2012
*/
-( function ( $ ) {
+( function ( mw, $ ) {
'use strict';
var util,
@@ -77,12 +77,20 @@
this.lazyLimit = 2000;
this.lazyCounter = 0;
- var that = this;
+ var that = this, warn;
// Bind begin and end to QUnit.
QUnit.begin( function () {
+ // Suppress warnings (e.g. deprecation notices for
accessing the properties)
+ warn = mw.log.warn;
+ mw.log.warn = $.noop;
+
that.walkTheObject( null, masterVariable,
masterVariable, [], CompletenessTest.ACTION_INJECT );
log( 'CompletenessTest/walkTheObject/ACTION_INJECT',
that );
+
+ // Restore warnings
+ mw.log.warn = warn;
+ warn = undefined;
});
QUnit.done( function () {
@@ -321,4 +329,4 @@
/* Expose */
window.CompletenessTest = CompletenessTest;
-}( jQuery ) );
+}( mediaWiki, jQuery ) );
--
To view, visit https://gerrit.wikimedia.org/r/140652
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I710946062edd38b8d72ced6d67bd4bb7613246e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits