mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-28 18:10:06 +00:00
ae99be730e
Change-Id: I57a8f188eb1152438a8e94235a6f6801e2617c28
18 lines
584 B
JavaScript
18 lines
584 B
JavaScript
( function ( mw, $ ) {
|
|
QUnit.module( 'mmv.logging.DimensionLogger', QUnit.newMwEnvironment() );
|
|
|
|
QUnit.test( 'log()', 1, function ( assert ) {
|
|
var fakeEventLog = { logEvent: this.sandbox.stub() },
|
|
logger = new mw.mmv.logging.DimensionLogger();
|
|
|
|
this.sandbox.stub( logger, 'loadDependencies' ).returns( $.Deferred().resolve() );
|
|
this.sandbox.stub( mw, 'log' );
|
|
|
|
logger.samplingFactor = 1;
|
|
logger.setEventLog( fakeEventLog );
|
|
|
|
logger.logDimensions( 640, 480, 200, 'resize' );
|
|
assert.ok( true, 'logDimensions() did not throw errors' );
|
|
} );
|
|
}( mediaWiki, jQuery ) );
|