mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-12-19 11:21:35 +00:00
5bf1466e7f
* Removed deprecated testCount, which is no longer supported in this way. It's only useful when wanting to explicitly expect 0 assertions (normally considered an error). * Replaced use of testCount = 0, with assert.expect( 0 ). Change-Id: I8fe82032d3af2a1ad2ed7febdb90a95d56dd3fc4
18 lines
581 B
JavaScript
18 lines
581 B
JavaScript
( function ( mw, $ ) {
|
|
QUnit.module( 'mmv.logging.DimensionLogger', QUnit.newMwEnvironment() );
|
|
|
|
QUnit.test( 'log()', 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 ) );
|