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

18 lines
477 B
JavaScript
Raw Normal View History

( 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 );