2020-11-18 09:11:12 +00:00
|
|
|
var Pointer = require( 'ext.RevisionSlider.Pointer' ).Pointer;
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2020-11-18 09:11:12 +00:00
|
|
|
QUnit.module( 'ext.RevisionSlider.Pointer' );
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2020-11-18 09:11:12 +00:00
|
|
|
QUnit.test( 'Initialize Pointer', function ( assert ) {
|
|
|
|
assert.ok( ( new Pointer( 'mw-revslider-pointer' ) ).getView().render().hasClass( 'mw-revslider-pointer' ) );
|
|
|
|
} );
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2020-11-18 09:11:12 +00:00
|
|
|
QUnit.test( 'Set and get position', function ( assert ) {
|
|
|
|
var pointer = new Pointer(),
|
|
|
|
pos = 42;
|
2016-05-03 11:26:42 +00:00
|
|
|
|
2020-11-18 09:11:12 +00:00
|
|
|
pointer.setPosition( pos );
|
|
|
|
assert.strictEqual( pointer.getPosition(), pos );
|
|
|
|
} );
|