mediawiki-extensions-Multim.../tests/qunit/lightboximage.test.js
Aaron Arcos 5fd02ad8f2 Create smoke tests for the LightboxImage class.
Change-Id: I0e5cec7bbcc4140fc6b74e3cf39c0a7b08891194
2013-12-10 00:59:37 +00:00

17 lines
600 B
JavaScript

( function ( /** mw, $ ** Commentted to keep lint happy, uncomment when needed */) {
QUnit.module( 'ext.multimediaViewer.lightboxImage', QUnit.newMwEnvironment() );
QUnit.asyncTest( 'Sanity test, object creation and image loading', 1, function ( assert ) {
var lightboxImage = new window.LightboxImage( 'http://en.wikipedia.org/w/skins/vector/images/search-ltr.png' );
// Function to be called if loading is successful
function loadCallback() {
assert.ok( true, 'Image loaded !' );
QUnit.start();
}
lightboxImage.getImageElement( loadCallback );
} );
}( mediaWiki, jQuery ) );