Skip to content

Commit

Permalink
fix: add types for stablePatchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
thymikee committed Mar 16, 2019
1 parent 991458d commit c165c4e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type DiffOptions = {
contextLines?: number
aAnnotation?: string
bAnnotation?: string
stablePatchmarks?: boolean
}

declare namespace jest {
Expand Down
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@ const prettyFormat = require('pretty-format');
const { ReactElement } = prettyFormat.plugins;
const reactElement = Symbol.for('react.element');

type Options = {
type Options = {|
expand?: boolean,
colors?: boolean,
contextLines?: number,
aAnnotation?: string,
bAnnotation?: string,
};
stablePatchmarks?: boolean,
|};

const defaultOptions = {
expand: false,
colors: false,
contextLines: -1, // Forces to use default from Jest
stablePatchmarks: false,
aAnnotation: 'First value',
bAnnotation: 'Second value',
stablePatchmarks: false,
};

const SNAPSHOT_TITLE = 'Snapshot Diff:\n';
Expand Down

0 comments on commit c165c4e

Please sign in to comment.