@@ -67,8 +67,8 @@ describe('groupTrackedChanges', () => {
6767
6868 it ( 'groups marks by raw id' , ( ) => {
6969 vi . mocked ( getTrackChanges ) . mockReturnValue ( [
70- { ...makeTrackMark ( TrackInsertMarkName , 'tc-1' ) , from : 1 , to : 5 } ,
71- { ...makeTrackMark ( TrackDeleteMarkName , 'tc-1' ) , from : 5 , to : 10 } ,
70+ { ...makeTrackMark ( TrackInsertMarkName , 'tc-1' , { sourceId : '11' } ) , from : 1 , to : 5 } ,
71+ { ...makeTrackMark ( TrackDeleteMarkName , 'tc-1' , { sourceId : '10' } ) , from : 5 , to : 10 } ,
7272 ] as never ) ;
7373
7474 const editor = makeEditor ( ) ;
@@ -80,6 +80,7 @@ describe('groupTrackedChanges', () => {
8080 expect ( grouped [ 0 ] ?. to ) . toBe ( 10 ) ;
8181 expect ( grouped [ 0 ] ?. hasInsert ) . toBe ( true ) ;
8282 expect ( grouped [ 0 ] ?. hasDelete ) . toBe ( true ) ;
83+ expect ( grouped [ 0 ] ?. wordRevisionIds ) . toEqual ( { insert : '11' , delete : '10' } ) ;
8384 } ) ;
8485
8586 it ( 'keeps separate entries for different raw ids' , ( ) => {
@@ -137,13 +138,14 @@ describe('groupTrackedChanges', () => {
137138
138139 it ( 'detects format marks' , ( ) => {
139140 vi . mocked ( getTrackChanges ) . mockReturnValue ( [
140- { ...makeTrackMark ( TrackFormatMarkName , 'tc-1' ) , from : 1 , to : 5 } ,
141+ { ...makeTrackMark ( TrackFormatMarkName , 'tc-1' , { sourceId : '22' } ) , from : 1 , to : 5 } ,
141142 ] as never ) ;
142143
143144 const grouped = groupTrackedChanges ( makeEditor ( ) ) ;
144145 expect ( grouped [ 0 ] ?. hasFormat ) . toBe ( true ) ;
145146 expect ( grouped [ 0 ] ?. hasInsert ) . toBe ( false ) ;
146147 expect ( grouped [ 0 ] ?. hasDelete ) . toBe ( false ) ;
148+ expect ( grouped [ 0 ] ?. wordRevisionIds ) . toEqual ( { format : '22' } ) ;
147149 } ) ;
148150
149151 it ( 'sorts results by from position' , ( ) => {
0 commit comments