mediawiki-extensions-Revisi.../tests/RevisionSlider.SliderView.test.js
addshore cfac82978c Fix commented out tests
Change-Id: I283228cc03dcc64107720f9092a2f41483f74853
2016-05-10 18:14:10 +01:00

22 lines
744 B
JavaScript

( function ( mw ) {
var SliderView = mw.libs.revisionSlider.SliderView,
Slider = mw.libs.revisionSlider.Slider,
Revision = mw.libs.revisionSlider.Revision,
RevisionList = mw.libs.revisionSlider.RevisionList;
QUnit.module( 'ext.RevisionSlider.SliderView' );
QUnit.test( 'render', function ( assert ) {
var $container = $( '<div/>' ),
view = new SliderView( new Slider( new RevisionList( [
new Revision( { size: 5, comment: 'Comment1', user: 'User1' } ),
new Revision( { size: 21, comment: 'Comment2', user: 'User2' } ),
new Revision( { size: 13, comment: 'Comment3', user: 'User3' } )
] ) ) );
view.render( $container );
assert.ok( $container.find( '.revision-slider' ).length > 0 );
} );
} )( mediaWiki );