mediawiki-extensions-Revisi.../tests/RevisionSlider.Pointer.test.js

19 lines
473 B
JavaScript
Raw Normal View History

( function ( mw ) {
var Pointer = mw.libs.revisionSlider.Pointer;
QUnit.module( 'ext.RevisionSlider.Revision' );
QUnit.test( 'Initialize Pointer', function ( assert ) {
assert.ok( ( new Pointer( 'a-pointer' ) ).getView().render().find( '#a-pointer' ) );
} );
QUnit.test( 'Set and get position', function ( assert ) {
var pointer = new Pointer(),
pos = 42;
pointer.setPosition( pos );
assert.equal( pointer.getPosition(), pos );
} );
} )( mediaWiki );