mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 12:53:24 +00:00
5e4a544133
This is a big change, but should change nothing except the sizes of some files and where they all are. There are no more ext.multimediaViewer strings ANYWHERE, so let's keep it that way. :) Change-Id: Ic0892f5894700938bfa01f3f9bc8e5ab8276eb72
16 lines
743 B
JavaScript
16 lines
743 B
JavaScript
( function () {
|
|
QUnit.module( 'multilightbox', QUnit.newMwEnvironment() );
|
|
|
|
QUnit.test( 'Smoke test', 3, function ( assert ) {
|
|
function DummyClass() {}
|
|
var lightboxImage = new window.LightboxImage( 'http://en.wikipedia.org/w/skins/vector/images/search-ltr.png' ),
|
|
multiLightbox = new window.MultiLightbox( [lightboxImage] ),
|
|
multilightbox2 = new window.MultiLightbox( [lightboxImage], 0, DummyClass );
|
|
|
|
assert.strictEqual( multiLightbox.currentIndex, 0, 'currentIndex initialized correctly.' );
|
|
assert.ok( multiLightbox.iface instanceof window.LightboxInterface, 'Using default LightboxInterface class' );
|
|
assert.ok( multilightbox2.iface instanceof DummyClass, 'Using injected DummyClass' );
|
|
} );
|
|
|
|
}( mediaWiki, jQuery ) );
|