Permalink
Please sign in to comment.
Showing
with
274 additions
and 33 deletions.
- +0 −9 App.test.js
- +9 −1 DEV.md
- +28 −0 __tests__/App-test.js
- +232 −0 __tests__/__snapshots__/App-test.js.snap
- +2 −2 package.json
- +3 −21 yarn.lock
@@ -0,0 +1,28 @@ | |||
import React from 'react'; | |||
import App from '../App'; | |||
|
|||
import renderer from 'react-test-renderer'; | |||
|
|||
describe('app', () => { | |||
const app = renderer.create(<App />); | |||
|
|||
it('renders app', () => { | |||
const rendered = app.toJSON(); | |||
expect(rendered).toMatchSnapshot() | |||
}); | |||
|
|||
describe('toggle', () => { | |||
it('start meeting', () => { | |||
app.getInstance().toggleMeeting(); | |||
const rendered = app.toJSON(); | |||
expect(rendered).toMatchSnapshot() | |||
}); | |||
|
|||
it('stop meeting', () => { | |||
app.getInstance().toggleMeeting(); | |||
const rendered = app.toJSON(); | |||
expect(rendered).toMatchSnapshot() | |||
}); | |||
}) | |||
}) | |||
|
@@ -0,0 +1,232 @@ | |||
// Jest Snapshot v1, https://goo.gl/fbAQLP | |||
|
|||
exports[`app renders app 1`] = ` | |||
<View | |||
style={ | |||
Object { | |||
"alignItems": "center", | |||
"backgroundColor": "#fff", | |||
"flex": 1, | |||
"justifyContent": "center", | |||
} | |||
} | |||
> | |||
<Text | |||
accessible={true} | |||
allowFontScaling={true} | |||
ellipsizeMode="tail" | |||
> | |||
33 Minutes | |||
</Text> | |||
<View | |||
accessibilityComponentType="button" | |||
accessibilityLabel={undefined} | |||
accessibilityTraits={ | |||
Array [ | |||
"button", | |||
] | |||
} | |||
accessible={true} | |||
collapsable={undefined} | |||
hasTVPreferredFocus={undefined} | |||
hitSlop={undefined} | |||
isTVSelectable={true} | |||
nativeID={undefined} | |||
onLayout={undefined} | |||
onResponderGrant={[Function]} | |||
onResponderMove={[Function]} | |||
onResponderRelease={[Function]} | |||
onResponderTerminate={[Function]} | |||
onResponderTerminationRequest={[Function]} | |||
onStartShouldSetResponder={[Function]} | |||
style={ | |||
Object { | |||
"opacity": 1, | |||
} | |||
} | |||
testID={undefined} | |||
tvParallaxProperties={undefined} | |||
> | |||
<View | |||
style={ | |||
Array [ | |||
Object {}, | |||
] | |||
} | |||
> | |||
<Text | |||
accessible={true} | |||
allowFontScaling={true} | |||
disabled={undefined} | |||
ellipsizeMode="tail" | |||
style={ | |||
Array [ | |||
Object { | |||
"color": "#007AFF", | |||
"fontSize": 18, | |||
"padding": 8, | |||
"textAlign": "center", | |||
}, | |||
] | |||
} | |||
> | |||
Start Meeting | |||
</Text> | |||
</View> | |||
</View> | |||
</View> | |||
`; | |||
|
|||
exports[`app toggle start meeting 1`] = ` | |||
<View | |||
style={ | |||
Object { | |||
"alignItems": "center", | |||
"backgroundColor": "#fff", | |||
"flex": 1, | |||
"justifyContent": "center", | |||
} | |||
} | |||
> | |||
<Text | |||
accessible={true} | |||
allowFontScaling={true} | |||
ellipsizeMode="tail" | |||
> | |||
33 Minutes | |||
</Text> | |||
<View | |||
accessibilityComponentType="button" | |||
accessibilityLabel={undefined} | |||
accessibilityTraits={ | |||
Array [ | |||
"button", | |||
] | |||
} | |||
accessible={true} | |||
collapsable={undefined} | |||
hasTVPreferredFocus={undefined} | |||
hitSlop={undefined} | |||
isTVSelectable={true} | |||
nativeID={undefined} | |||
onLayout={undefined} | |||
onResponderGrant={[Function]} | |||
onResponderMove={[Function]} | |||
onResponderRelease={[Function]} | |||
onResponderTerminate={[Function]} | |||
onResponderTerminationRequest={[Function]} | |||
onStartShouldSetResponder={[Function]} | |||
style={ | |||
Object { | |||
"opacity": 1, | |||
} | |||
} | |||
testID={undefined} | |||
tvParallaxProperties={undefined} | |||
> | |||
<View | |||
style={ | |||
Array [ | |||
Object {}, | |||
] | |||
} | |||
> | |||
<Text | |||
accessible={true} | |||
allowFontScaling={true} | |||
disabled={undefined} | |||
ellipsizeMode="tail" | |||
style={ | |||
Array [ | |||
Object { | |||
"color": "#007AFF", | |||
"fontSize": 18, | |||
"padding": 8, | |||
"textAlign": "center", | |||
}, | |||
] | |||
} | |||
> | |||
Stop Meeting | |||
</Text> | |||
</View> | |||
</View> | |||
</View> | |||
`; | |||
|
|||
exports[`app toggle stop meeting 1`] = ` | |||
<View | |||
style={ | |||
Object { | |||
"alignItems": "center", | |||
"backgroundColor": "#fff", | |||
"flex": 1, | |||
"justifyContent": "center", | |||
} | |||
} | |||
> | |||
<Text | |||
accessible={true} | |||
allowFontScaling={true} | |||
ellipsizeMode="tail" | |||
> | |||
33 Minutes | |||
</Text> | |||
<View | |||
accessibilityComponentType="button" | |||
accessibilityLabel={undefined} | |||
accessibilityTraits={ | |||
Array [ | |||
"button", | |||
] | |||
} | |||
accessible={true} | |||
collapsable={undefined} | |||
hasTVPreferredFocus={undefined} | |||
hitSlop={undefined} | |||
isTVSelectable={true} | |||
nativeID={undefined} | |||
onLayout={undefined} | |||
onResponderGrant={[Function]} | |||
onResponderMove={[Function]} | |||
onResponderRelease={[Function]} | |||
onResponderTerminate={[Function]} | |||
onResponderTerminationRequest={[Function]} | |||
onStartShouldSetResponder={[Function]} | |||
style={ | |||
Object { | |||
"opacity": 1, | |||
} | |||
} | |||
testID={undefined} | |||
tvParallaxProperties={undefined} | |||
> | |||
<View | |||
style={ | |||
Array [ | |||
Object {}, | |||
] | |||
} | |||
> | |||
<Text | |||
accessible={true} | |||
allowFontScaling={true} | |||
disabled={undefined} | |||
ellipsizeMode="tail" | |||
style={ | |||
Array [ | |||
Object { | |||
"color": "#007AFF", | |||
"fontSize": 18, | |||
"padding": 8, | |||
"textAlign": "center", | |||
}, | |||
] | |||
} | |||
> | |||
Start Meeting | |||
</Text> | |||
</View> | |||
</View> | |||
</View> | |||
`; |
0 comments on commit
b05d45d