File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change 755
755
} ) ;
756
756
757
757
} ) ;
758
-
758
+
759
759
describe ( 'Diff-ing symbol-based keys should work' , function ( ) {
760
760
const lhs = {
761
- [ Symbol . iterator ] : "Iterator"
761
+ [ Symbol . iterator ] : 'Iterator' , // eslint-disable-line no-undef
762
+ foo : 'bar'
762
763
} ;
763
764
const rhs = {
764
- foo : "bar"
765
+ foo : 'baz'
765
766
} ;
766
-
767
+
767
768
const res = deep . diff ( lhs , rhs ) ;
768
769
expect ( res ) . to . be . ok ( ) ;
769
770
expect ( res ) . to . be . an ( 'array' ) ;
770
771
expect ( res ) . to . have . length ( 2 ) ;
771
772
772
773
let changed = 0 , deleted = 0 ;
773
774
for ( const difference of res ) {
774
- if ( difference . kind == 'D' )
775
+ if ( difference . kind === 'D' ) {
775
776
deleted += 1 ;
776
- else if ( difference . kind == 'E' )
777
+ } else if ( difference . kind === 'E' ) {
777
778
changed += 1 ;
779
+ }
778
780
}
779
781
780
782
expect ( changed ) . to . be ( 1 ) ;
You can’t perform that action at this time.
0 commit comments