resourceloader: Use perf.now() for mediaWikiLoadStart in startup.js
[lhc/web/wiklou.git] / tests / qunit / suites / resources / mediawiki / mediawiki.test.js
index bac8274..65b7263 100644 (file)
                );
        } );
 
+       QUnit.test( 'mw.now', function ( assert ) {
+               assert.equal( typeof mw.now(), 'number', 'Return a number' );
+               assert.equal(
+                       String( Math.round( mw.now() ) ).length,
+                       String( +new Date() ).length,
+                       'Match size of current timestamp'
+               );
+       } );
+
        QUnit.test( 'mw.Map', function ( assert ) {
                var arry, conf, funky, globalConf, nummy, someValues;