mediawiki-extensions-Revisi.../tests/qunit/RevisionSlider.Pointer.test.js
thiemowmde 759c081add Drop separate .render/.initialize logic from View classes
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
2024-02-26 20:40:28 +00:00

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 );
} );
}() );