react-native-macos/jest
Rick Hanlon c5b80062ea Fix ActivityIndicator snapshot test, add toMatchShallowSnapshot
Summary:
This diff adds a custom matcher which will wrap a given component and shallow render it, snapshotting the result with the formatting users will see when they do the same.

I also update the ActivityIndicator test to use this new strategy, and add an additional check that the displayName is set.

For context see:
- https://github.com/facebook/react-native/pull/21950
- https://github.com/rajivshah3/rn-broken-snapshot/blob/broken-example/__tests__/App.spec.js#L3
- https://github.com/facebook/react-native/issues/21937

Reviewed By: TheSavior

Differential Revision: D13326689

fbshipit-source-id: 8ed2302a8aad12962fa2498a46d2502ccfb5c737
2018-12-05 17:23:42 -08:00
..
__tests__ Add tests for out-of-tree platform support (#20932) 2018-09-27 13:19:32 -07:00
MockNativeMethods.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
assetFileTransformer.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
hasteImpl.js Add tests for out-of-tree platform support (#20932) 2018-09-27 13:19:32 -07:00
mockComponent.js use requireActual and requireMock from jest instead of require (#21849) 2018-10-18 15:32:15 -07:00
preprocessor.js 0.87.0 in xplat/js 2018-11-28 17:32:50 -08:00
renderer.js Fix ActivityIndicator snapshot test, add toMatchShallowSnapshot 2018-12-05 17:23:42 -08:00
setup.js Back out "reapply TextInput es6 conversion with fixes, attemps to fix" 2018-11-16 14:50:23 -08:00