mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-21 03:02:45 +00:00
759c081add
Most callers use it as if it's a `getElement` call anyway. There is one .initialize method left in the HelpDialog class. That's part of the upstream OOUI Window interfaces. Change-Id: I5727c59ad0ad05d712d51d255906ddc44e898668
18 lines
521 B
JavaScript
18 lines
521 B
JavaScript
( function () {
|
|
const Pointer = require( 'ext.RevisionSlider.Slider' ).private.Pointer;
|
|
|
|
QUnit.module( 'ext.RevisionSlider.Pointer' );
|
|
|
|
QUnit.test( 'Initialize Pointer', function ( assert ) {
|
|
assert.true( ( new Pointer( 'mw-revslider-pointer' ) ).getView().getElement().hasClass( 'mw-revslider-pointer' ) );
|
|
} );
|
|
|
|
QUnit.test( 'Set and get position', function ( assert ) {
|
|
const pointer = new Pointer(),
|
|
pos = 42;
|
|
|
|
pointer.setPosition( pos );
|
|
assert.strictEqual( pointer.getPosition(), pos );
|
|
} );
|
|
}() );
|