Skip to content

Commit b1a6960

Browse files
author
Andrew Luca
committed
1 parent f6dc97d commit b1a6960

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed

.flowconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[version]
2-
0.79.1
2+
0.84.0
33

44
[ignore]
55
<PROJECT_ROOT>/dist/.*

flow-typed/npm/jest_v25.x.x.js

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// flow-typed signature: f1c890c0bc8178f13f15d0443b34bd5f
2-
// flow-typed version: 7223a8293e/jest_v25.x.x/flow_>=v0.39.x <=v0.103.x
1+
// flow-typed signature: f3e5d388b2c86a25ffee45e89bc98e87
2+
// flow-typed version: dd2428a21d/jest_v25.x.x/flow_>=v0.39.x <=v0.103.x
33

44
type JestMockFn<TArguments: $ReadOnlyArray<*>, TReturn> = {
55
(...args: TArguments): TReturn,
@@ -574,13 +574,36 @@ type JestExtendedMatchersType = {
574574
toIncludeMultiple(substring: string[]): void,
575575
};
576576

577+
// Diffing snapshot utility for Jest (snapshot-diff)
578+
// https://github.com/jest-community/snapshot-diff
579+
type SnapshotDiffType = {
580+
/**
581+
* Compare the difference between the actual in the `expect()`
582+
* vs the object inside `valueB` with some extra options.
583+
*/
584+
toMatchDiffSnapshot(
585+
valueB: any,
586+
options?: {|
587+
expand?: boolean;
588+
colors?: boolean;
589+
contextLines?: number;
590+
stablePatchmarks?: boolean;
591+
aAnnotation?: string;
592+
bAnnotation?: string;
593+
|},
594+
testName?: string
595+
): void,
596+
...
597+
}
598+
577599
interface JestExpectType {
578600
not: JestExpectType &
579601
EnzymeMatchersType &
580602
DomTestingLibraryType &
581603
JestJQueryMatchersType &
582604
JestStyledComponentsMatchersType &
583-
JestExtendedMatchersType;
605+
JestExtendedMatchersType &
606+
SnapshotDiffType;
584607
/**
585608
* If you have a mock function, you can use .lastCalledWith to test what
586609
* arguments it was last called with.
@@ -1158,7 +1181,8 @@ declare var expect: {
11581181
DomTestingLibraryType &
11591182
JestJQueryMatchersType &
11601183
JestStyledComponentsMatchersType &
1161-
JestExtendedMatchersType,
1184+
JestExtendedMatchersType &
1185+
SnapshotDiffType,
11621186

11631187
/** Add additional Jasmine matchers to Jest's roster */
11641188
extend(matchers: { [name: string]: JestMatcher }): void,

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"eslint-plugin-jsx-a11y": "^6.2.3",
8282
"eslint-plugin-react": "^7.19.0",
8383
"eslint-plugin-react-hooks": "^2.5.1",
84-
"flow-bin": "^0.79.1",
84+
"flow-bin": "^0.84.0",
8585
"flux-standard-action": "^2.1.1",
8686
"husky": "^1.2.1",
8787
"immutable": "^3.8.2",

0 commit comments

Comments
 (0)