File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ type DiffOptions = {
44 expand ?: boolean
55 colors ?: boolean
66 contextLines ?: number
7+ stablePatchmarks ?: boolean
78 aAnnotation ?: string
89 bAnnotation ?: string
910}
Original file line number Diff line number Diff line change @@ -9,13 +9,14 @@ const prettyFormat = require('pretty-format');
99const { ReactElement } = prettyFormat . plugins ;
1010const reactElement = Symbol . for ( 'react.element' ) ;
1111
12- type Options = {
12+ type Options = { |
1313 expand ? : boolean ,
1414 colors ? : boolean ,
1515 contextLines ? : number ,
16+ stablePatchmarks ? : boolean ,
1617 aAnnotation ? : string ,
1718 bAnnotation ? : string ,
18- } ;
19+ | } ;
1920
2021const defaultOptions = {
2122 expand : false ,
@@ -30,7 +31,7 @@ const SNAPSHOT_TITLE = 'Snapshot Diff:\n';
3031
3132const snapshotDiff = ( valueA : any , valueB : any , options ? : Options ) : string => {
3233 let difference ;
33- const mergedOptions = Object . assign ( { } , defaultOptions , options ) ;
34+ const mergedOptions = { ... defaultOptions , ... options } ;
3435
3536 if ( isReactComponent ( valueA ) && isReactComponent ( valueB ) ) {
3637 difference = diffReactComponents ( valueA , valueB , mergedOptions ) ;
You can’t perform that action at this time.
0 commit comments