File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ test('unist-diff', function (t) {
54
54
} ) ;
55
55
56
56
t . test ( '`props`' , function ( st ) {
57
- st . plan ( 10 ) ;
57
+ st . plan ( 11 ) ;
58
58
59
59
( function ( ) {
60
60
var alpha = { type : 'alpha' } ;
@@ -206,6 +206,25 @@ test('unist-diff', function (t) {
206
206
) ;
207
207
} ) ( ) ;
208
208
209
+ ( function ( ) {
210
+ var alpha = { type : 'alpha' } ;
211
+ var left = { type : 'bravo' , charlie : [ 1 , 2 ] , children : [ alpha ] } ;
212
+ var right = { type : 'bravo' , charlie : { delta : true } , children : [ alpha ] } ;
213
+
214
+ st . deepEqual (
215
+ diff ( left , right ) ,
216
+ {
217
+ 0 : {
218
+ type : 'props' ,
219
+ left : left ,
220
+ right : { charlie : { delta : true } }
221
+ } ,
222
+ left : left
223
+ } ,
224
+ 'should return a `props` patch for an array changed to an object'
225
+ ) ;
226
+ } ) ( ) ;
227
+
209
228
( function ( ) {
210
229
var alpha = { type : 'alpha' } ;
211
230
var left = { type : 'bravo' , charlie : { delta : true } , children : [ alpha ] } ;
You can’t perform that action at this time.
0 commit comments