Skip to content

Commit

Permalink
deps: Upgrade jest to 26.1.0, the latest.
Browse files Browse the repository at this point in the history
Also, add @jest/source-map, without which some chain of dependencies
doesn't go the right way, and the "modern" fake-timer implementation
isn't available. (That landed in jestjs/jest#7776 with
jestjs/jest@71631f6bf.)

The libdef process was fairly smooth: there was one available from
FlowTyped, so I ran `flow-typed install jest@26`. Add a line in our
Flow config under [libs] as suggested in chat [1]; otherwise, Flow
sees a Jest libdef in `node_modules/react-native` and uses that
instead. In an upcoming commit, we'll add a few methods on the Jest
object that didn't make it into the libdef in FlowTyped for whatever
reason.

Run `yarn yarn-deduplicate && yarn` as prompted by
`tools/test deps`.

[1] https://chat.zulip.org/#narrow/stream/48-mobile/topic/flow-typed.20for.20Jest/near/854562
  • Loading branch information
chrisbobbe committed Aug 14, 2020
1 parent 347aa96 commit fb23341
Show file tree
Hide file tree
Showing 4 changed files with 1,403 additions and 797 deletions.
4 changes: 4 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ flow-typed/react-native-webview_v7.x.x.js
flow-typed/react-native-url-polyfill_vx.x.x.js
flow-typed/expo-screen-orientation_vx.x.x.js

; Explicitly name these so that Flow sees them instead of their
; counterparts in node_modules/react-native:
flow-typed/npm/jest_v26.x.x.js


[strict]
; These apply only to files where `@flow strict` is enabled.
Expand Down
Loading

0 comments on commit fb23341

Please sign in to comment.