mediawiki-extensions-Revisi.../tests/qunit/RevisionSlider.Pointer.test.js
WMDE-Fisch 1fa153aeab Fix issues to prepare for lint update
The new mw eslint config comes with node 12 and the change will be
quite big due to the lock file. I wanted to keep the diff of actual
code changes seperate.

- Applied all code style recommendations
- Removed one test that's not giving any value
- Changed regex .match to .test for performance and convinience

Change-Id: I578be8c6460c7a4d1220354c028a9bfd9bb86d13
2022-01-13 13:59:53 +01:00

16 lines
479 B
JavaScript

var 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().render().hasClass( 'mw-revslider-pointer' ) );
} );
QUnit.test( 'Set and get position', function ( assert ) {
var pointer = new Pointer(),
pos = 42;
pointer.setPosition( pos );
assert.strictEqual( pointer.getPosition(), pos );
} );