Index: trunk/parsers/wikidom/tests/annotations/test.js |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | |
57 | 57 | /* Tests */ |
58 | 58 | |
59 | | -test( 'Content modification', 13, function() { |
| 59 | +test( 'Content modification', 17, function() { |
60 | 60 | |
61 | 61 | content.on( 'change', function( args ) { |
62 | 62 | ok( true, 'Change events get triggered after ' + args.type + ' events' ); |
— | — | @@ -73,6 +73,8 @@ |
74 | 74 | ok( true, 'Annotate events get triggered' ); |
75 | 75 | equal( args.method, 'add', 'Annotate events have correct method' ); |
76 | 76 | 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' ); |
77 | 79 | deepEqual( |
78 | 80 | content.data.slice( 4, 8 ), |
79 | 81 | [' ', ['a', { 'type': 'italic' }], 'b', 'c'], |
— | — | @@ -83,6 +85,8 @@ |
84 | 86 | |
85 | 87 | content.on( 'remove', function( args ) { |
86 | 88 | 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' ); |
87 | 91 | deepEqual( |
88 | 92 | content.data.slice( 4, 8 ), |
89 | 93 | [' ', 'i', 's', ' '], |