r101698 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101697‎ | r101698 | r101699 >
Date:21:21, 2 November 2011
Author:tparscal
Status:ok
Tags:
Comment:
Moving hype tests to VisualEditor extension
Modified paths:
  • /trunk/extensions/VisualEditor/tests/es.test.js (added) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/tests/es.test.js
@@ -0,0 +1,14 @@
 2+module( 'es' );
 3+
 4+test( 'es.insertIntoArray', 1, function() {
 5+ var insert = [], i, arr = ['foo', 'bar'], expected = [];
 6+ expected[0] = 'foo';
 7+ for ( i = 0; i < 3000; i++ ) {
 8+ insert[i] = i;
 9+ expected[i + 1] = i;
 10+ }
 11+ expected[3001] = 'bar';
 12+
 13+ es.insertIntoArray( arr, 1, insert );
 14+ deepEqual( arr, expected, 'splicing 3000 elements into the middle of a 2-element array' );
 15+} );
Property changes on: trunk/extensions/VisualEditor/tests/es.test.js
___________________________________________________________________
Added: svn:eol-style
116 + native

Status & tagging log