mediawiki.util.test: Suppress deprecation notice for jsMessage
authorTimo Tijhof <krinklemail@gmail.com>
Wed, 30 Apr 2014 23:39:33 +0000 (01:39 +0200)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 30 Apr 2014 23:39:33 +0000 (01:39 +0200)
* Hide the false positive when running the QUnit test suite.
* Clean up documentation comment (tag order) for consistency
  with the rest of the code base.

Follows-up Ib41d5245682552, I211593629ca2.

Change-Id: Iac42aef26f78b5637e5aaafb6fc48e60e9ea0e3f

resources/src/mediawiki/mediawiki.util.js
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js

index f09d03c..5fc7371 100644 (file)
        mw.log.deprecate( util, 'wikiGetlink', util.getUrl, 'Use mw.util.getUrl instead.' );
 
        /**
-        * @property {string} tooltipAccessKeyPrefix
         * Access key prefix. Might be wrong for browsers implementing the accessKeyLabel property.
+        * @property {string} tooltipAccessKeyPrefix
         * @deprecated since 1.24 Use the module jquery.accessKeyLabel instead.
         */
        mw.log.deprecate( util, 'tooltipAccessKeyPrefix', $.fn.updateTooltipAccessKeys.getAccessKeyPrefix(), 'Use jquery.accessKeyLabel instead.' );
 
        /**
-        * @property {RegExp} tooltipAccessKeyRegexp
         * Regex to match accesskey tooltips.
         *
         * Should match:
         *
         * Will probably not work for browsers implementing the accessKeyLabel property.
         *
+        * @property {RegExp} tooltipAccessKeyRegexp
         * @deprecated since 1.24 Use the module jquery.accessKeyLabel instead.
         */
        mw.log.deprecate( util, 'tooltipAccessKeyRegexp', /\[(ctrl-)?(option-)?(alt-)?(shift-)?(esc-)?(.)\]$/, 'Use jquery.accessKeyLabel instead.' );
 
        /**
-        * @method jsMessage
         * Add a little box at the top of the screen to inform the user of
         * something, replacing any previous message.
         * Calling with no arguments, with an empty string or null will hide the message
         *
-        * @param {Mixed} message The DOM-element, jQuery object or HTML-string to be put inside the message box.
-        * to allow CSS/JS to hide different boxes. null = no class used.
+        * @method jsMessage
         * @deprecated since 1.20 Use mw#notify
+        * @param {Mixed} message The DOM-element, jQuery object or HTML-string to be put inside the message box.
+        *  to allow CSS/JS to hide different boxes. null = no class used.
         */
        mw.log.deprecate( util, 'jsMessage', function ( message ) {
                if ( !arguments.length || message === '' || message === null ) {
index 1e059e1..81fda7e 100644 (file)
        } );
 
        QUnit.test( 'jsMessage', 1, function ( assert ) {
+               this.suppressWarnings();
                var a = mw.util.jsMessage( 'MediaWiki is <b>Awesome</b>.' );
+               this.restoreWarnings();
                assert.ok( a, 'Basic checking of return value' );
 
                // Clean up