@@ -109,7 +109,7 @@ describe('array-changes', function () {
109109 expect ( arrayChanges ( [ 1 , 2 , 3 , 0 ] , [ 0 , 1 , 2 , 3 ] , function ( a , b ) {
110110 return a === b ;
111111 } ) , 'to equal' , [
112- { type : 'moveTarget' , value : 0 , actualIndex : 3 , last : false } ,
112+ { type : 'moveTarget' , value : 0 , actualIndex : 3 , expected : 0 , expectedIndex : 0 , equal : true , last : false } ,
113113 { type : 'equal' , value : 1 , actualIndex : 0 , expected : 1 , expectedIndex : 1 } ,
114114 { type : 'equal' , value : 2 , actualIndex : 1 , expected : 2 , expectedIndex : 2 } ,
115115 { type : 'equal' , value : 3 , actualIndex : 2 , expected : 3 , expectedIndex : 3 } ,
@@ -122,7 +122,7 @@ describe('array-changes', function () {
122122 return a === b ;
123123 } ) , 'to equal' , [
124124 { type : 'equal' , value : 0 , actualIndex : 0 , expected : 0 , expectedIndex : 0 } ,
125- { type : 'moveTarget' , value : 2 , actualIndex : 2 , last : false } ,
125+ { type : 'moveTarget' , value : 2 , actualIndex : 2 , expected : 2 , expectedIndex : 1 , equal : true , last : false } ,
126126 { type : 'equal' , value : 1 , actualIndex : 1 , expected : 1 , expectedIndex : 2 } ,
127127 { type : 'moveSource' , value : 2 , actualIndex : 2 , expected : 2 , expectedIndex : 1 , equal : true } ,
128128 { type : 'equal' , value : 3 , actualIndex : 3 , expected : 3 , expectedIndex : 3 , last : true }
@@ -445,7 +445,15 @@ describe('array-changes', function () {
445445 } , function ( a , b ) {
446446 return a . kind === b . kind ;
447447 } ) , 'to equal' , [
448- { type : 'moveTarget' , value : { kind : 1 , type : 'tag' , name : 'p' , children : [ { data : 'Hello world 2023' , type : 'text' } ] , attribs : { } } , actualIndex : 1 , last : false } ,
448+ {
449+ type : 'moveTarget' ,
450+ value : { kind : 1 , type : 'tag' , name : 'p' , children : [ { data : 'Hello world 2023' , type : 'text' } ] , attribs : { } } ,
451+ expected : { kind : 1 , type : 'tag' , name : 'p' , children : [ { data : 'Hello world 2025' , type : 'text' } ] , attribs : { } } ,
452+ actualIndex : 1 ,
453+ expectedIndex : 0 ,
454+ equal : false ,
455+ last : false
456+ } ,
449457 {
450458 type : 'equal' ,
451459 value : { kind : 0 , type : 'tag' , name : 'p' , children : [ { data : 'A' , type : 'text' } ] , attribs : { } } ,
0 commit comments