Suppress deprecation warnings in 'jquery.mwExtension.test'
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 23 Jun 2015 02:39:36 +0000 (03:39 +0100)
committerOri.livneh <ori@wikimedia.org>
Tue, 23 Jun 2015 03:52:08 +0000 (03:52 +0000)
Follows-up b0ee0c0.

Change-Id: I1e38ec9b7e822c177e038b2c83827a3910fe75ad

tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js

index 795c2bb..911e9d0 100644 (file)
@@ -1,5 +1,14 @@
 ( function ( $ ) {
-       QUnit.module( 'jquery.mwExtension', QUnit.newMwEnvironment() );
+       QUnit.module( 'jquery.mwExtension', QUnit.newMwEnvironment( {
+               // This entire module is deprecated.
+               // Surpress deprecation warnings in test output.
+               setup: function () {
+                       this.suppressWarnings();
+               },
+               teardown: function () {
+                       this.restoreWarnings();
+               }
+       }) );
 
        QUnit.test( 'String functions', 7, function ( assert ) {
                assert.equal( $.trimLeft( '  foo bar  ' ), 'foo bar  ', 'trimLeft' );