File tree 2 files changed +4
-7
lines changed
2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1
1
/** @format */
2
2
3
+ import React from 'react' ;
3
4
import renderer from 'react-test-renderer' ;
4
5
5
6
import App from '..' ;
6
7
7
8
test ( 'should render properly' , ( ) => {
8
- const tree = renderer . create ( App ) . toJSON ( ) ;
9
+ const tree = renderer . create ( < App /> ) . toJSON ( ) ;
9
10
expect ( tree ) . toMatchSnapshot ( ) ;
10
11
} ) ;
Original file line number Diff line number Diff line change 1
- //@flow
2
-
3
1
/**
4
- * React Native Basic App
5
- * https://github.com/facebook/react-native
6
- *
7
2
* @format
3
+ * @flow
8
4
*/
9
5
10
6
import React from 'react' ;
@@ -42,7 +38,7 @@ const instructions = Platform.select({
42
38
android : 'Double tap R on your keyboard to reload,\nShake or press menu button for dev menu' ,
43
39
} ) ;
44
40
45
- const App = (
41
+ const App = ( ) => (
46
42
< View style = { styles . container } >
47
43
< Text style = { styles . welcome } > Welcome to React Native!</ Text >
48
44
< Text style = { styles . instructions } > Your App is ready and you already have:</ Text >
You can’t perform that action at this time.
0 commit comments