mediawiki-extensions-Multim.../tests/qunit/multilightbox.test.js
Gilles Dubuc a5cddef17a Lazy-load mmv
Also removes the index inside the location hash

Change-Id: I9429ff0101ab891f2c4c6aa2d989fbef0813252d
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/136
2014-02-18 15:55:15 -08:00

15 lines
598 B
JavaScript

( function () {
QUnit.module( 'multilightbox', QUnit.newMwEnvironment() );
QUnit.test( 'Smoke test', 3, function ( assert ) {
function DummyClass() {}
var multiLightbox = new window.MultiLightbox(),
multilightbox2 = new window.MultiLightbox( 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 ) );