mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/RevisionSlider
synced 2024-12-11 15:06:19 +00:00
980f2ca917
* 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
17 lines
450 B
JavaScript
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 );
|