File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ type DiffOptions = {
44 expand ?: boolean
55 colors ?: boolean
66 contextLines ?: number
7+ stablePatchmarks ?: boolean
78 aAnnotation ?: string
89 bAnnotation ?: string
9- stablePatchmarks ?: boolean
1010}
1111
1212declare namespace jest {
Original file line number Diff line number Diff line change @@ -13,25 +13,25 @@ type Options = {|
1313 expand ? : boolean ,
1414 colors ? : boolean ,
1515 contextLines ? : number ,
16+ stablePatchmarks ? : boolean ,
1617 aAnnotation ? : string ,
1718 bAnnotation ? : string ,
18- stablePatchmarks ? : boolean ,
1919| } ;
2020
2121const defaultOptions = {
2222 expand : false ,
2323 colors : false ,
2424 contextLines : - 1 , // Forces to use default from Jest
25+ stablePatchmarks : false ,
2526 aAnnotation : 'First value' ,
2627 bAnnotation : 'Second value' ,
27- stablePatchmarks : false ,
2828} ;
2929
3030const SNAPSHOT_TITLE = 'Snapshot Diff:\n' ;
3131
3232const snapshotDiff = ( valueA : any , valueB : any , options ? : Options ) : string => {
3333 let difference ;
34- const mergedOptions = Object . assign ( { } , defaultOptions , options ) ;
34+ const mergedOptions = { ... defaultOptions , ... options } ;
3535
3636 if ( isReactComponent ( valueA ) && isReactComponent ( valueB ) ) {
3737 difference = diffReactComponents ( valueA , valueB , mergedOptions ) ;
You can’t perform that action at this time.
0 commit comments