mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-11-15 03:33:45 +00:00
8e7fe2434d
First I jumped on replacing both jscs and jshint with eslint but it might be premature decision. Although linting with eslint is possible (like in there is wikimedia config for eslint) it is still not clear should it But in case the change happens we will be ready. Apart from config stuff this changes few bits spotted by eslint: improves some indentation, removes weird spaces, completes some doc blocks, changes IIFE forms in tests. These changes do not seem controversial. Change-Id: I9f8bf0f5745da8e662685f4cd879ea4baa609c01
19 lines
497 B
JavaScript
19 lines
497 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-revslider-pointer' ) );
|
|
} );
|
|
|
|
QUnit.test( 'Set and get position', function ( assert ) {
|
|
var pointer = new Pointer(),
|
|
pos = 42;
|
|
|
|
pointer.setPosition( pos );
|
|
assert.equal( pointer.getPosition(), pos );
|
|
} );
|
|
|
|
}( mediaWiki ) );
|