Merge "mw.hook: Use hasOwnProperty"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 13 Apr 2014 09:08:26 +0000 (09:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 13 Apr 2014 09:08:26 +0000 (09:08 +0000)
1  2 
tests/qunit/suites/resources/mediawiki/mediawiki.test.js

@@@ -1,4 -1,3 +1,4 @@@
 +/*jshint -W024 */
  ( function ( mw, $ ) {
        var specialCharactersPageName;
  
  
        } );
  
-       QUnit.test( 'mw.hook', 12, function ( assert ) {
+       QUnit.test( 'mw.hook', 13, function ( assert ) {
                var hook, add, fire, chars, callback;
  
                mw.hook( 'test.hook.unfired' ).add( function () {
                } );
                mw.hook( 'test.hook.basic' ).fire();
  
+               mw.hook( 'hasOwnProperty' ).add( function () {
+                       assert.ok( true, 'hook with name of predefined method' );
+               } );
+               mw.hook( 'hasOwnProperty' ).fire();
                mw.hook( 'test.hook.data' ).add( function ( data1, data2 ) {
                        assert.equal( data1, 'example', 'Fire with data (string param)' );
                        assert.deepEqual( data2, ['two'], 'Fire with data (array param)' );