mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-12-01 03:06:17 +00:00
ffc8f4948d
- Moved tests that were meant for LightboxInterface objects. - Fixed space naming issues. Change-Id: Ib83904eab5fa542330ea559d420efa5f1de8c3eb
16 lines
778 B
JavaScript
16 lines
778 B
JavaScript
( function () {
|
|
QUnit.module( 'ext.multimediaViewer.multilightbox.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 ) );
|