-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This diff upgrades Jest to the latest version which fixes a bunch of issues with snapshots (therefore allowing me to enable the Pressable-test again). Note that this also affects Metro and various other tooling as they all depend on packages like `jest-worker`, `jest-haste-map` etc. Breaking changes: https://github.com/facebook/jest/blob/master/CHANGELOG.md This diff increases node_modules by 3 MiB, primarily because it causes more duplicates of `source-map` (0.8 MiB for each copy) and packages like `chalk` 3.x (vs 2.x). The base install was 15 MiB bigger and I reduced it to this size by playing around with various manual yarn.lock optimizations. However, D21085929 reduces node_modules by 11 MiB and the Babel upgrade reduced node_modules by 13 MiB. I will subsequently work on reducing the size through other packages as well and I'm working with the Jest folks to get rid of superfluous TypeScript stuff for Jest 26. Other changes in this diff: * Fixed Pressable-test * Blackhole node-notifier: It's large and we don't need it, and also the license may be problematic, see: jestjs/jest#8918 * Updated jest-junit (not a Jest package) but blackholed it internally because it is only used for open source CI. * Updated some API calls we use from Jest to account for breaking changes * Made two absolutely egrigious changes to existing product code tests to make them still pass as our match of async/await, fake timers and then/promise using `setImmediate` is tripping up `regenerator` with `Generator is already run` errors in Jest 25. These tests should probably be rewritten. * Locked everything to the same `resolve` version that we were already using, otherwise it was somehow pulling in 1.16 even though nothing internally uses it. Changelog: [General] Update Jest Reviewed By: rickhanlonii Differential Revision: D21064825 fbshipit-source-id: d0011a51355089456718edd84ea0af21fd923a58
- Loading branch information
1 parent
7cc791b
commit f248ba1
Showing
7 changed files
with
1,363 additions
and
832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
Libraries/Components/Pressable/__tests__/__snapshots__/Pressable-test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Pressable /> should render as expected: should deep render when mocked (please verify output manually) 1`] = ` | ||
<View | ||
accessible={true} | ||
focusable={true} | ||
onBlur={[Function]} | ||
onClick={[Function]} | ||
onFocus={[Function]} | ||
onResponderGrant={[Function]} | ||
onResponderMove={[Function]} | ||
onResponderRelease={[Function]} | ||
onResponderTerminate={[Function]} | ||
onResponderTerminationRequest={[Function]} | ||
onStartShouldSetResponder={[Function]} | ||
> | ||
<View /> | ||
</View> | ||
`; | ||
|
||
exports[`<Pressable /> should render as expected: should deep render when not mocked (please verify output manually) 1`] = ` | ||
<View | ||
accessible={true} | ||
focusable={true} | ||
onBlur={[Function]} | ||
onClick={[Function]} | ||
onFocus={[Function]} | ||
onResponderGrant={[Function]} | ||
onResponderMove={[Function]} | ||
onResponderRelease={[Function]} | ||
onResponderTerminate={[Function]} | ||
onResponderTerminationRequest={[Function]} | ||
onStartShouldSetResponder={[Function]} | ||
> | ||
<View /> | ||
</View> | ||
`; | ||
|
||
exports[`<Pressable /> should render as expected: should shallow render as <Pressable /> when mocked 1`] = ` | ||
<Memo(Pressable)> | ||
<View /> | ||
</Memo(Pressable)> | ||
`; | ||
|
||
exports[`<Pressable /> should render as expected: should shallow render as <Pressable /> when not mocked 1`] = ` | ||
<Memo(Pressable)> | ||
<View /> | ||
</Memo(Pressable)> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.