mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-11 23:16:18 +00:00
18 lines
477 B
JavaScript
18 lines
477 B
JavaScript
|
( function ( mw ) {
|
||
|
var PointerView = mw.libs.revisionSlider.PointerView;
|
||
|
|
||
|
QUnit.module( 'ext.RevisionSlider.Revision' );
|
||
|
|
||
|
QUnit.test( 'Initialize PointerView', function ( assert ) {
|
||
|
assert.ok( ( new PointerView( 'left-pointer' ) ).render().find( '.left-pointer' ) );
|
||
|
} );
|
||
|
|
||
|
QUnit.test( 'Has offset', function ( assert ) {
|
||
|
var offset = 30,
|
||
|
pointer = new PointerView( 'left-pointer', offset );
|
||
|
|
||
|
assert.equal( pointer.getOffset(), offset );
|
||
|
} );
|
||
|
|
||
|
} )( mediaWiki );
|