mediawiki-extensions-Multim.../tests/qunit/multilightbox.test.js
Mark Holmquist 5e4a544133 Moving things around for module renames
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
2014-01-24 09:21:16 -08:00

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 ) );