2018-11-16 16:33:52 +00:00
|
|
|
( function () {
|
2016-05-03 11:26:42 +00:00
|
|
|
var Pointer = mw.libs.revisionSlider.Pointer;
|
|
|
|
|
2016-05-17 11:46:48 +00:00
|
|
|
QUnit.module( 'ext.RevisionSlider.Pointer' );
|
2016-05-03 11:26:42 +00:00
|
|
|
|
|
|
|
QUnit.test( 'Initialize Pointer', function ( assert ) {
|
2016-07-01 10:13:53 +00:00
|
|
|
assert.ok( ( new Pointer( 'mw-revslider-pointer' ) ).getView().render().hasClass( 'mw-revslider-pointer' ) );
|
2016-05-03 11:26:42 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
QUnit.test( 'Set and get position', function ( assert ) {
|
|
|
|
var pointer = new Pointer(),
|
|
|
|
pos = 42;
|
|
|
|
|
|
|
|
pointer.setPosition( pos );
|
2018-09-13 20:54:39 +00:00
|
|
|
assert.strictEqual( pointer.getPosition(), pos );
|
2016-05-03 11:26:42 +00:00
|
|
|
} );
|
|
|
|
|
2018-11-16 16:33:52 +00:00
|
|
|
}() );
|