r93673 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93672‎ | r93673 | r93674 >
Date:23:10, 1 August 2011
Author:inez
Status:deferred
Tags:
Comment:
Fix "Content modification" tests
Modified paths:
  • /trunk/parsers/wikidom/tests/annotations/test.js (modified) (history)

Diff [purge]

Index: trunk/parsers/wikidom/tests/annotations/test.js
@@ -55,7 +55,7 @@
5656
5757 /* Tests */
5858
59 -test( 'Content modification', 13, function() {
 59+test( 'Content modification', 17, function() {
6060
6161 content.on( 'change', function( args ) {
6262 ok( true, 'Change events get triggered after ' + args.type + ' events' );
@@ -73,6 +73,8 @@
7474 ok( true, 'Annotate events get triggered' );
7575 equal( args.method, 'add', 'Annotate events have correct method' );
7676 deepEqual( args.annotation, { 'type': 'italic' }, 'Annotate events have correct annotation' );
 77+ equal( args.range.start, 5, 'Remove events have correct start points' );
 78+ equal( args.range.end, 6, 'Remove events have correct end points' );
7779 deepEqual(
7880 content.data.slice( 4, 8 ),
7981 [' ', ['a', { 'type': 'italic' }], 'b', 'c'],
@@ -83,6 +85,8 @@
8486
8587 content.on( 'remove', function( args ) {
8688 ok( true, 'Remove events get triggered' );
 89+ equal( args.range.start, 5, 'Remove events have correct start points' );
 90+ equal( args.range.end, 8, 'Remove events have correct end points' );
8791 deepEqual(
8892 content.data.slice( 4, 8 ),
8993 [' ', 'i', 's', ' '],

Status & tagging log