2013-12-10 02:02:48 +00:00
|
|
|
( function () {
|
2014-01-23 21:44:26 +00:00
|
|
|
QUnit.module( 'multilightbox', QUnit.newMwEnvironment() );
|
2013-12-10 02:02:48 +00:00
|
|
|
|
2013-12-11 02:08:07 +00:00
|
|
|
QUnit.test( 'Smoke test', 3, function ( assert ) {
|
|
|
|
function DummyClass() {}
|
2014-02-17 15:09:23 +00:00
|
|
|
var multiLightbox = new window.MultiLightbox(),
|
|
|
|
multilightbox2 = new window.MultiLightbox( 0, DummyClass );
|
2013-12-10 02:02:48 +00:00
|
|
|
|
|
|
|
assert.strictEqual( multiLightbox.currentIndex, 0, 'currentIndex initialized correctly.' );
|
2013-12-11 02:08:07 +00:00
|
|
|
assert.ok( multiLightbox.iface instanceof window.LightboxInterface, 'Using default LightboxInterface class' );
|
|
|
|
assert.ok( multilightbox2.iface instanceof DummyClass, 'Using injected DummyClass' );
|
2013-12-10 02:02:48 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
}( mediaWiki, jQuery ) );
|