2016-02-15 14:37:19 -08:00
|
|
|
/* Copyright 2016 Realm Inc - All Rights Reserved
|
2015-10-28 10:40:07 -07:00
|
|
|
* Proprietary and Confidential
|
2015-10-02 14:57:54 -07:00
|
|
|
*/
|
2015-10-28 10:40:07 -07:00
|
|
|
|
2015-10-02 14:57:54 -07:00
|
|
|
'use strict';
|
|
|
|
|
2016-01-06 15:24:00 -08:00
|
|
|
const React = require('react-native');
|
|
|
|
const Realm = require('realm');
|
2016-02-15 14:37:19 -08:00
|
|
|
const tests = require('./tests');
|
2015-10-02 14:57:54 -07:00
|
|
|
|
2016-01-06 15:24:00 -08:00
|
|
|
const {
|
2015-10-15 11:34:24 -07:00
|
|
|
AppRegistry,
|
|
|
|
StyleSheet,
|
|
|
|
Text,
|
|
|
|
TouchableHighlight,
|
|
|
|
View,
|
2015-10-02 14:57:54 -07:00
|
|
|
} = React;
|
|
|
|
|
2016-01-06 15:24:00 -08:00
|
|
|
class ReactTests extends React.Component {
|
2015-10-14 14:58:42 -07:00
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<View style={styles.container}>
|
2016-02-15 14:37:19 -08:00
|
|
|
<Text style={styles.button} onPress={tests.runTests}>
|
2015-10-15 11:34:24 -07:00
|
|
|
Tap to Run Tests
|
2015-10-14 14:58:42 -07:00
|
|
|
</Text>
|
|
|
|
<Text style={styles.instructions}>
|
|
|
|
Press Cmd+R to reload,{'\n'}
|
|
|
|
Cmd+D or shake for dev menu
|
|
|
|
</Text>
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
}
|
2016-01-06 15:24:00 -08:00
|
|
|
}
|
2015-10-02 14:57:54 -07:00
|
|
|
|
|
|
|
var styles = StyleSheet.create({
|
2015-10-15 11:34:24 -07:00
|
|
|
container: {
|
|
|
|
flex: 1,
|
|
|
|
justifyContent: 'center',
|
|
|
|
alignItems: 'center',
|
|
|
|
backgroundColor: '#F5FCFF',
|
|
|
|
},
|
|
|
|
button: {
|
|
|
|
borderColor: '#cccccc',
|
|
|
|
borderRadius: 4,
|
|
|
|
borderWidth: 1,
|
|
|
|
fontSize: 20,
|
|
|
|
textAlign: 'center',
|
|
|
|
margin: 20,
|
|
|
|
padding: 10,
|
|
|
|
},
|
|
|
|
instructions: {
|
|
|
|
textAlign: 'center',
|
|
|
|
color: '#333333',
|
|
|
|
marginBottom: 5,
|
|
|
|
},
|
2015-10-02 14:57:54 -07:00
|
|
|
});
|
|
|
|
|
|
|
|
AppRegistry.registerComponent('ReactTests', () => ReactTests);
|