Skip to content

Instantly share code, notes, and snippets.

@joshtch
Created March 19, 2020 01:57
Show Gist options
  • Save joshtch/8ad751ad171a873ac104178dd2085e9f to your computer and use it in GitHub Desktop.
Save joshtch/8ad751ad171a873ac104178dd2085e9f to your computer and use it in GitHub Desktop.
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`App renders correctly 1`] = `
<View
style={
Object {
"backgroundColor": "#fff",
"flex": 1,
}
}
>
<View
style={
Object {
"flex": 1,
}
}
>
<RNCSafeAreaView
onInsetsChange={[Function]}
style={
Object {
"flex": 1,
}
}
>
<View
onLayout={[Function]}
style={
Object {
"flex": 1,
"overflow": "hidden",
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
accessibilityElementsHidden={false}
closing={false}
gestureVelocityImpact={0.3}
importantForAccessibility="auto"
onClose={[Function]}
onGestureBegin={[Function]}
onGestureCanceled={[Function]}
onOpen={[Function]}
onTransitionStart={[Function]}
pointerEvents="box-none"
style={
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
transitionSpec={
Object {
"close": Object {
"animation": "spring",
"config": Object {
"damping": 500,
"mass": 3,
"overshootClamping": true,
"restDisplacementThreshold": 0.01,
"restSpeedThreshold": 0.01,
"stiffness": 1000,
},
},
"open": Object {
"animation": "spring",
"config": Object {
"damping": 500,
"mass": 3,
"overshootClamping": true,
"restDisplacementThreshold": 0.01,
"restSpeedThreshold": 0.01,
"stiffness": 1000,
},
},
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"flex": 1,
"marginTop": 64,
}
}
>
<View
collapsable={false}
onGestureHandlerEvent={[Function]}
onGestureHandlerStateChange={[Function]}
style={
Object {
"flex": 1,
"transform": Array [
Object {
"translateX": 0,
},
Object {
"translateX": 0,
},
],
}
}
>
<View
pointerEvents="none"
style={
Object {
"backgroundColor": "#fff",
"bottom": 0,
"left": 0,
"position": "absolute",
"shadowColor": "#000",
"shadowOffset": Object {
"height": 1,
"width": -1,
},
"shadowOpacity": 0.3,
"shadowRadius": 5,
"top": 0,
"width": 3,
}
}
/>
<View
style={
Array [
Object {
"flex": 1,
"overflow": "hidden",
},
Array [
Object {
"backgroundColor": "rgb(242, 242, 242)",
},
undefined,
],
]
}
>
<View
style={
Object {
"flex": 1,
"flexDirection": "column-reverse",
}
}
>
<View
style={
Object {
"flex": 1,
}
}
>
<View
style={
Object {
"flex": 1,
"overflow": "hidden",
}
}
>
<View
style={
Object {
"flex": 1,
}
}
>
<View
collapsable={false}
pointerEvents="auto"
removeClippedSubviews={false}
style={
Array [
Object {
"flex": 1,
"overflow": "hidden",
},
Object {
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
},
Object {
"opacity": 1,
},
]
}
>
<View
style={
Object {
"flex": 1,
}
}
>
<View
accessibilityElementsHidden={false}
importantForAccessibility="auto"
style={
Array [
Object {
"flex": 1,
},
Object {
"backgroundColor": "rgb(242, 242, 242)",
},
]
}
>
<View
style={
Object {
"backgroundColor": "#fff",
"flex": 1,
}
}
>
<RCTScrollView
collapsable={false}
contentContainerStyle={
Object {
"paddingTop": 30,
}
}
onGestureHandlerEvent={[Function]}
onGestureHandlerStateChange={[Function]}
style={
Object {
"backgroundColor": "#fff",
"flex": 1,
}
}
>
<View>
<View
style={
Object {
"alignItems": "center",
"marginBottom": 20,
"marginTop": 10,
}
}
>
<Image
source={1}
style={
Object {
"height": 80,
"marginLeft": -10,
"marginTop": 3,
"resizeMode": "contain",
"width": 100,
}
}
/>
</View>
<View
style={
Object {
"alignItems": "center",
"marginHorizontal": 50,
}
}
>
<Text
style={
Object {
"color": "rgba(0,0,0,0.4)",
"fontSize": 14,
"lineHeight": 19,
"marginBottom": 20,
"textAlign": "center",
}
}
>
Development mode is enabled: your app will be slower but you can use useful development tools.
<Text
onPress={[Function]}
style={
Object {
"color": "#2e78b7",
"fontSize": 14,
}
}
>
Learn more
</Text>
</Text>
<Text
style={
Object {
"color": "rgba(96,100,109, 1)",
"fontSize": 17,
"lineHeight": 24,
"textAlign": "center",
}
}
>
Open up the code for this screen:
</Text>
<View
style={
Array [
Object {
"backgroundColor": "rgba(0,0,0,0.05)",
"borderRadius": 3,
"paddingHorizontal": 4,
},
Object {
"marginVertical": 7,
},
]
}
>
<Text
style={
Array [
undefined,
Object {
"fontFamily": "space-mono",
},
]
}
>
screens/HomeScreen.js
</Text>
</View>
<Text
style={
Object {
"color": "rgba(96,100,109, 1)",
"fontSize": 17,
"lineHeight": 24,
"textAlign": "center",
}
}
>
Change any of the text, save the file, and your app will automatically reload.
</Text>
</View>
<View
style={
Object {
"alignItems": "center",
"marginTop": 15,
}
}
>
<View
accessible={true}
focusable={true}
isTVSelectable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"opacity": 1,
"paddingVertical": 15,
}
}
>
<Text
style={
Object {
"color": "#2e78b7",
"fontSize": 14,
}
}
>
Help, it didn’t automatically reload!
</Text>
</View>
</View>
</View>
</RCTScrollView>
<View
style={
Object {
"alignItems": "center",
"backgroundColor": "#fbfbfb",
"bottom": 0,
"left": 0,
"paddingVertical": 20,
"position": "absolute",
"right": 0,
"shadowColor": "black",
"shadowOffset": Object {
"height": -3,
"width": 0,
},
"shadowOpacity": 0.1,
"shadowRadius": 3,
}
}
>
<Text
style={
Object {
"color": "rgba(96,100,109, 1)",
"fontSize": 17,
"textAlign": "center",
}
}
>
This is a tab bar. You can edit it in:
</Text>
<View
style={
Array [
Object {
"backgroundColor": "rgba(0,0,0,0.05)",
"borderRadius": 3,
"paddingHorizontal": 4,
},
Object {
"marginTop": 5,
},
]
}
>
<Text
style={
Array [
Object {
"color": "rgba(96,100,109, 0.8)",
},
Object {
"fontFamily": "space-mono",
},
]
}
>
navigation/BottomTabNavigator.js
</Text>
</View>
</View>
</View>
</View>
</View>
</View>
</View>
<View
pointerEvents="auto"
style={
Object {
"backgroundColor": "rgb(255, 255, 255)",
"borderTopColor": "rgb(224, 224, 224)",
"borderTopWidth": 0.5,
"bottom": 0,
"elevation": 8,
"height": 50,
"left": 0,
"paddingBottom": 0,
"paddingHorizontal": 0,
"right": 0,
}
}
>
<View
onLayout={[Function]}
style={
Object {
"flex": 1,
"flexDirection": "row",
}
}
>
<View
accessibilityLabel="Get Started, tab, 1 of 2"
accessibilityRole="button"
accessibilityStates={
Array [
"selected",
]
}
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"alignItems": "center",
"flex": 1,
},
Object {
"backgroundColor": "transparent",
},
Object {
"flexDirection": "column",
"justifyContent": "flex-end",
},
undefined,
]
}
>
<View
style={
Object {
"flex": 1,
}
}
>
<View
style={
Array [
Object {
"alignItems": "center",
"alignSelf": "center",
"height": "100%",
"justifyContent": "center",
"minWidth": 25,
"position": "absolute",
"width": "100%",
},
Object {
"opacity": 1,
},
]
}
>
<Text
allowFontScaling={false}
style={
Array [
Object {
"color": "#2f95dc",
"fontSize": 30,
},
Object {
"marginBottom": -3,
},
Object {
"fontFamily": "ionicons",
"fontStyle": "normal",
"fontWeight": "normal",
},
Object {},
]
}
>
</Text>
</View>
<View
style={
Array [
Object {
"alignItems": "center",
"alignSelf": "center",
"height": "100%",
"justifyContent": "center",
"minWidth": 25,
"position": "absolute",
"width": "100%",
},
Object {
"opacity": 0,
},
]
}
>
<Text
allowFontScaling={false}
style={
Array [
Object {
"color": "#ccc",
"fontSize": 30,
},
Object {
"marginBottom": -3,
},
Object {
"fontFamily": "ionicons",
"fontStyle": "normal",
"fontWeight": "normal",
},
Object {},
]
}
>
</Text>
</View>
</View>
<Text
numberOfLines={1}
style={
Object {
"backgroundColor": "transparent",
"color": "rgb(0, 122, 255)",
"fontSize": 11,
"marginBottom": 1.5,
"textAlign": "center",
}
}
>
Get Started
</Text>
</View>
<View
accessibilityLabel="Resources, tab, 2 of 2"
accessibilityRole="button"
accessibilityStates={Array []}
accessible={true}
focusable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Array [
Object {
"alignItems": "center",
"flex": 1,
},
Object {
"backgroundColor": "transparent",
},
Object {
"flexDirection": "column",
"justifyContent": "flex-end",
},
undefined,
]
}
>
<View
style={
Object {
"flex": 1,
}
}
>
<View
style={
Array [
Object {
"alignItems": "center",
"alignSelf": "center",
"height": "100%",
"justifyContent": "center",
"minWidth": 25,
"position": "absolute",
"width": "100%",
},
Object {
"opacity": 0,
},
]
}
>
<Text
allowFontScaling={false}
style={
Array [
Object {
"color": "#2f95dc",
"fontSize": 30,
},
Object {
"marginBottom": -3,
},
Object {
"fontFamily": "ionicons",
"fontStyle": "normal",
"fontWeight": "normal",
},
Object {},
]
}
>
</Text>
</View>
<View
style={
Array [
Object {
"alignItems": "center",
"alignSelf": "center",
"height": "100%",
"justifyContent": "center",
"minWidth": 25,
"position": "absolute",
"width": "100%",
},
Object {
"opacity": 1,
},
]
}
>
<Text
allowFontScaling={false}
style={
Array [
Object {
"color": "#ccc",
"fontSize": 30,
},
Object {
"marginBottom": -3,
},
Object {
"fontFamily": "ionicons",
"fontStyle": "normal",
"fontWeight": "normal",
},
Object {},
]
}
>
</Text>
</View>
</View>
<Text
numberOfLines={1}
style={
Object {
"backgroundColor": "transparent",
"color": "#8E8E8F",
"fontSize": 11,
"marginBottom": 1.5,
"textAlign": "center",
}
}
>
Resources
</Text>
</View>
</View>
</View>
</View>
</View>
</View>
</View>
</View>
</View>
</View>
</View>
</View>
<View
pointerEvents="box-none"
style={
Object {
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
accessibilityElementsHidden={false}
importantForAccessibility="auto"
onLayout={[Function]}
pointerEvents="box-none"
style={null}
>
<View
pointerEvents="none"
style={
Object {
"bottom": 0,
"left": 0,
"opacity": 1,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
style={
Object {
"backgroundColor": "rgb(255, 255, 255)",
"borderBottomColor": "rgb(224, 224, 224)",
"flex": 1,
"shadowColor": "rgb(224, 224, 224)",
"shadowOffset": Object {
"height": 0.5,
"width": 0,
},
"shadowOpacity": 0.85,
"shadowRadius": 0,
}
}
/>
</View>
<View
pointerEvents="box-none"
style={
Object {
"height": 64,
"maxHeight": undefined,
"minHeight": undefined,
"opacity": undefined,
"transform": undefined,
}
}
>
<View
pointerEvents="none"
style={
Object {
"height": 20,
}
}
/>
<View
pointerEvents="box-none"
style={
Object {
"alignItems": "center",
"flex": 1,
"flexDirection": "row",
"justifyContent": "center",
}
}
>
<View
pointerEvents="box-none"
style={
Object {
"marginHorizontal": 18,
"opacity": 1,
}
}
>
<Text
accessibilityRole="header"
numberOfLines={1}
onLayout={[Function]}
style={
Object {
"color": "rgb(28, 28, 30)",
"fontSize": 17,
"fontWeight": "600",
}
}
>
How to get started
</Text>
</View>
</View>
</View>
</View>
</View>
</RNCSafeAreaView>
</View>
</View>
`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment