Skip to content

Commit c165c4e

Browse files
committed
fix: add types for stablePatchmarks
1 parent 991458d commit c165c4e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ type DiffOptions = {
66
contextLines?: number
77
aAnnotation?: string
88
bAnnotation?: string
9+
stablePatchmarks?: boolean
910
}
1011

1112
declare namespace jest {

src/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,22 @@ const prettyFormat = require('pretty-format');
99
const { ReactElement } = prettyFormat.plugins;
1010
const reactElement = Symbol.for('react.element');
1111

12-
type Options = {
12+
type Options = {|
1313
expand?: boolean,
1414
colors?: boolean,
1515
contextLines?: number,
1616
aAnnotation?: string,
1717
bAnnotation?: string,
18-
};
18+
stablePatchmarks?: boolean,
19+
|};
1920

2021
const defaultOptions = {
2122
expand: false,
2223
colors: false,
2324
contextLines: -1, // Forces to use default from Jest
24-
stablePatchmarks: false,
2525
aAnnotation: 'First value',
2626
bAnnotation: 'Second value',
27+
stablePatchmarks: false,
2728
};
2829

2930
const SNAPSHOT_TITLE = 'Snapshot Diff:\n';

0 commit comments

Comments
 (0)