react-native-macos/Libraries
Martin Yrjölä 25639176ff Asset basenames in Jest snapshots
Summary:
This change only affects tests run with Jest. `require('/images/image1.png')` will be replaced with

```
Object {
  "testUri": "relative/path/to/images/image1.png",
}
```

in the Jest snapshot instead of always being 1 returned by RelativeImageStub. This change makes it possible to test conditional asset loading in components.

The problem with this change is that it will probably break a lot of existing snapshots, but that should be easily fixed when a project updates to a new version of React Native by running `jest -u` to update all snapshots.

A component can have conditional asset loading based on its props, this logic would be nice to test with Jest snapshots. This problem has been discussed in https://github.com/facebook/jest/issues/2838.

* **Who does this affect**: Everyone using `Image` in Jest snapshots
* **How to migrate**: Running `jest -u` will update the snapshots, the snapshots should be reviewed that they are correct.
* **Why make this breaking change**: It enables testing of conditional asset loading.
* **Severity (number of people affected x effort)**: Low.
Closes https://github.com/facebook/react-native/pull/13319

Reviewed By: rafeca

Differential Revision: D5708180

Pulled By: mjesun

fbshipit-source-id: 16ac42004d597db08545a21d4fffe95c5ee7e21f
2017-09-06 03:33:43 -07:00
..
ART Standardize project indentation settings on 2 spaces 2017-07-31 05:20:03 -07:00
ActionSheetIOS Standardize project indentation settings on 2 spaces 2017-07-31 05:20:03 -07:00
Alert Alert - allow for hiding alert title on iOS 2017-08-30 17:16:17 -07:00
Animated Fix React Native open source 2017-08-29 15:01:05 -07:00
AppState Avoid race condition for AppState.currentState 2017-08-18 13:14:59 -07:00
BatchedBridge Increase information logged to MessageQueue.spy 2017-07-31 06:16:41 -07:00
Blob Update _flowconfig 2017-08-29 04:51:09 -07:00
BugReporting Patch up for future React Sync 2017-02-08 14:50:43 -08:00
CameraRoll Example of getPhotos Method 2017-09-01 11:48:54 -07:00
Components Added styles.viewPager to complete example code 2017-09-05 13:17:25 -07:00
Core Expose "register devtools plugin" interface globally in React-Native 2017-08-15 12:03:40 -07:00
EventEmitter Turn on Flow for EventEmitter 2017-08-30 11:52:28 -07:00
Experimental Fix React Native open source 2017-08-29 15:01:05 -07:00
Geolocation Reference PermissionsAndroid in Geolocation doc 2017-09-05 11:53:14 -07:00
Image Asset basenames in Jest snapshots 2017-09-06 03:33:43 -07:00
Inspector Upgrade fbsource/xplat/js to Flow v0.53.0 2017-08-17 18:45:01 -07:00
Interaction Increase information logged to MessageQueue.spy 2017-07-31 06:16:41 -07:00
JSInspector Add Network agent 2016-11-02 12:29:15 -07:00
LayoutAnimation Fix prop-types warning in LayoutAnimation 2017-05-12 15:06:17 -07:00
Linking Docs: fix typo in deeplinking docs 2017-07-26 07:18:44 -07:00
LinkingIOS Standardize project indentation settings on 2 spaces 2017-07-31 05:20:03 -07:00
Lists Extend FlatList to support multiple viewability configs 2017-09-05 18:51:25 -07:00
Modal Upgrade fbsource/xplat/js to Flow v0.53.0 2017-08-17 18:45:01 -07:00
NativeAnimation Standardize project indentation settings on 2 spaces 2017-07-31 05:20:03 -07:00
Network Turn on Flow for EventEmitter 2017-08-30 11:52:28 -07:00
Performance Gate more code with if (__DEV__) { } 2017-08-14 07:19:00 -07:00
PermissionsAndroid Update documentation for PermissionsAndroid 2017-08-16 15:01:51 -07:00
PushNotificationIOS Fix flowtype errors for PushNotificationIOS 2017-08-14 12:03:18 -07:00
RCTTest Increase RCTTestRunner timeouts 2017-08-25 10:00:39 -07:00
ReactNative Fix React Native open source 2017-08-29 15:01:05 -07:00
Renderer Fix React Native open source 2017-08-29 15:01:05 -07:00
Sample Standardize project indentation settings on 2 spaces 2017-07-31 05:20:03 -07:00
Settings Fix infinite recursion in RCTSettingsManager init 2017-08-09 09:39:40 -07:00
Share Flowify Process Color 2017-04-26 11:31:56 -07:00
Storage correctly order ASyncStorage 2017-02-21 15:18:40 -08:00
StyleSheet Fix stylesheet registery 2017-08-23 08:54:39 -07:00
Text Upgrade fbsource/xplat/js to Flow v0.53.0 2017-08-17 18:45:01 -07:00
Utilities Cleanup stray markdown files, update contributing guidelines 2017-08-04 16:18:01 -07:00
Vibration fix and enrich Vibration docs 2017-08-23 20:45:45 -07:00
WebSocket Expose webSocketDidOpen in RCTReconnectingWebSocket 2017-08-29 08:06:03 -07:00
fishhook Merge fishhook.xcodeproj in RCTWebSocket 2017-08-09 07:48:09 -07:00
polyfills Use proper script way to clone Emoji files from www 2017-08-21 16:29:39 -07:00
react-native Add Android React Native Checkbox 2017-08-25 10:30:54 -07:00
vendor Turn on Flow for EventEmitter 2017-08-30 11:52:28 -07:00
.eslintrc Disallow trailing commas in react-native-github 2017-08-17 16:20:04 -07:00
Promise.js Don't require prettyFormat in every single bundle. 2017-06-16 04:31:56 -07:00
promiseRejectionIsError.js RN: Cleanup OSS JS & Flow Declarations 2016-11-20 17:58:29 -08:00