mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-11 06:56:09 +00:00
1fa153aeab
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
16 lines
479 B
JavaScript
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 );
|
|
} );
|