mediawiki-extensions-Revisi.../tests/qunit/RevisionSlider.Pointer.test.js
libraryupgrader f5de8ee108 build: Updating npm dependencies
* eslint-config-wikimedia: 0.27.0 → 0.28.0
  The following rules are failing and were disabled:
  * modules:
    * no-mixed-spaces-and-tabs
    * no-jquery/no-extend
    * implicit-arrow-linebreak
  * tests/qunit:
    * no-jquery/no-extend

* grunt-stylelint: 0.19.0 → 0.20.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.1

Change-Id: I3fd3c4a2cbb03d3aa4c8efb658e33d14d24cd518
2024-06-08 12:04:26 +00:00

18 lines
509 B
JavaScript

( function () {
const Pointer = require( 'ext.RevisionSlider.Slider' ).private.Pointer;
QUnit.module( 'ext.RevisionSlider.Pointer' );
QUnit.test( 'Initialize Pointer', ( assert ) => {
assert.true( ( new Pointer( 'mw-revslider-pointer' ) ).getView().getElement().hasClass( 'mw-revslider-pointer' ) );
} );
QUnit.test( 'Set and get position', ( assert ) => {
const pointer = new Pointer(),
pos = 42;
pointer.setPosition( pos );
assert.strictEqual( pointer.getPosition(), pos );
} );
}() );