2016-05-03 11:26:42 +00:00
|
|
|
( function ( mw ) {
|
|
|
|
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 );
|
|
|
|
assert.equal( pointer.getPosition(), pos );
|
|
|
|
} );
|
|
|
|
|
2016-09-01 11:17:47 +00:00
|
|
|
}( mediaWiki ) );
|