mediawiki-extensions-Revisi.../tests/RevisionSlider.Pointer.test.js
Leszek Manicki a2774984c4 Make JavaScript code and CSS follow the style guide.
Changes include:
 - not passing in HTML attributes when creating tag elements,
 - creating HTML elements instead of appending hand-crafted HTML,
 - single append() calls instead of multiple consecutie appends,
 - not using raw HTML messages when not needed,
 - prefixing all CSS classes and IDs with "mw-" to avoid potential
   name conflicts.

Change-Id: I164538bbaf44d46a4c66659f56e07ec7225d7fa9
2016-05-31 14:57:14 +02:00

19 lines
487 B
JavaScript

( function ( mw ) {
var Pointer = mw.libs.revisionSlider.Pointer;
QUnit.module( 'ext.RevisionSlider.Pointer' );
QUnit.test( 'Initialize Pointer', function ( assert ) {
assert.ok( ( new Pointer( 'mw-revslider-pointer' ) ).getView().render().hasClass( 'mw-pointer' ) );
} );
QUnit.test( 'Set and get position', function ( assert ) {
var pointer = new Pointer(),
pos = 42;
pointer.setPosition( pos );
assert.equal( pointer.getPosition(), pos );
} );
} )( mediaWiki );