Skip to content

Commit

Permalink
chore: upgrade flow-bin to 0.84, need for future migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
iamandrewluca committed Apr 13, 2020
1 parent f6dc97d commit b1a6960
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[version]
0.79.1
0.84.0

[ignore]
<PROJECT_ROOT>/dist/.*
Expand Down
32 changes: 28 additions & 4 deletions flow-typed/npm/jest_v25.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: f1c890c0bc8178f13f15d0443b34bd5f
// flow-typed version: 7223a8293e/jest_v25.x.x/flow_>=v0.39.x <=v0.103.x
// flow-typed signature: f3e5d388b2c86a25ffee45e89bc98e87
// flow-typed version: dd2428a21d/jest_v25.x.x/flow_>=v0.39.x <=v0.103.x

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

// Diffing snapshot utility for Jest (snapshot-diff)
// https://github.com/jest-community/snapshot-diff
type SnapshotDiffType = {
/**
* Compare the difference between the actual in the `expect()`
* vs the object inside `valueB` with some extra options.
*/
toMatchDiffSnapshot(
valueB: any,
options?: {|
expand?: boolean;
colors?: boolean;
contextLines?: number;
stablePatchmarks?: boolean;
aAnnotation?: string;
bAnnotation?: string;
|},
testName?: string
): void,
...
}

interface JestExpectType {
not: JestExpectType &
EnzymeMatchersType &
DomTestingLibraryType &
JestJQueryMatchersType &
JestStyledComponentsMatchersType &
JestExtendedMatchersType;
JestExtendedMatchersType &
SnapshotDiffType;
/**
* If you have a mock function, you can use .lastCalledWith to test what
* arguments it was last called with.
Expand Down Expand Up @@ -1158,7 +1181,8 @@ declare var expect: {
DomTestingLibraryType &
JestJQueryMatchersType &
JestStyledComponentsMatchersType &
JestExtendedMatchersType,
JestExtendedMatchersType &
SnapshotDiffType,

/** Add additional Jasmine matchers to Jest's roster */
extend(matchers: { [name: string]: JestMatcher }): void,
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.1",
"flow-bin": "^0.79.1",
"flow-bin": "^0.84.0",
"flux-standard-action": "^2.1.1",
"husky": "^1.2.1",
"immutable": "^3.8.2",
Expand Down

0 comments on commit b1a6960

Please sign in to comment.