mediawiki-extensions-Revisi.../tests/RevisionSlider.RevisionList.test.js
Jakob Warkotsch 980f2ca917 Create Slider module.
* threw out most of the things from init.js
* turned Slider + View into respective modules
* pointers should remember position (except on page load) and correctly
  slide back to their position/to the side

Some things still need testing and refactoring.

Addshore: - CS fixes and comment out current failing tests

Bug: T134395
Change-Id: I78a7095e1d9902314163b1443448f47ef0484d4e
2016-05-10 17:38:46 +01:00

17 lines
450 B
JavaScript

( function ( mw ) {
var RevisionList = mw.libs.revisionSlider.RevisionList,
Revision = mw.libs.revisionSlider.Revision;
QUnit.module( 'ext.RevisionSlider.RevisionList' );
QUnit.test( 'Find biggest Revision', function ( assert ) {
var revs = new RevisionList( [
new Revision( { size: 5 } ),
new Revision( { size: 21 } ),
new Revision( { size: 13 } )
] );
assert.equal( revs.getBiggestChangeSize(), 16 );
} );
} )( mediaWiki );