Skip to content

Commit

Permalink
chore: update example to react-native@0.62 (#9746)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Apr 23, 2020
1 parent 2e45410 commit 58d199d
Show file tree
Hide file tree
Showing 5 changed files with 250 additions and 340 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Expand Up @@ -146,4 +146,7 @@ module.exports = {
'prettier/prettier': 2,
'sort-imports': [2, {ignoreDeclarationSort: true}],
},
settings: {
'import/ignore': ['react-native'],
},
};
12 changes: 0 additions & 12 deletions examples/react-native/__tests__/__snapshots__/intro.test.js.snap
Expand Up @@ -61,7 +61,6 @@ exports[`renders the FlatList component 1`] = `
initialNumToRender={10}
keyExtractor={[Function]}
maxToRenderPerBatch={10}
numColumns={1}
onContentSizeChange={[Function]}
onEndReachedThreshold={2}
onLayout={[Function]}
Expand Down Expand Up @@ -106,17 +105,6 @@ exports[`renders the FlatList component 1`] = `
</RCTScrollView>
`;

exports[`renders the Image component 1`] = `
<Image
style={
Object {
"height": 240,
"width": 320,
}
}
/>
`;

exports[`renders the TextInput component 1`] = `
<TextInput
allowFontScaling={true}
Expand Down
16 changes: 1 addition & 15 deletions examples/react-native/__tests__/intro.test.js
Expand Up @@ -5,13 +5,7 @@
*/

import React from 'react';
import {
ActivityIndicator,
FlatList,
Image,
Text,
TextInput,
} from 'react-native';
import {ActivityIndicator, FlatList, Text, TextInput} from 'react-native';
import renderer from 'react-test-renderer';
import Intro from '../Intro';

Expand All @@ -30,14 +24,6 @@ it('renders the ActivityIndicator component', () => {
expect(tree).toMatchSnapshot();
});

it('renders the Image component', done => {
Image.getSize('path.jpg', (width, height) => {
const tree = renderer.create(<Image style={{height, width}} />).toJSON();
expect(tree).toMatchSnapshot();
done();
});
});

it('renders the TextInput component', () => {
const tree = renderer
.create(<TextInput autoCorrect={false} value="apple banana kiwi" />)
Expand Down
8 changes: 4 additions & 4 deletions examples/react-native/package.json
Expand Up @@ -7,15 +7,15 @@
"test": "jest"
},
"dependencies": {
"react": "16.9.0",
"react-native": "0.61.5"
"react": "16.11.0",
"react-native": "0.62.0"
},
"devDependencies": {
"@babel/core": "*",
"@babel/preset-env": "*",
"babel-jest": "*",
"jest": "*",
"metro-react-native-babel-preset": "*",
"react-test-renderer": "16.9.0"
"metro-react-native-babel-preset": "^0.58.0",
"react-test-renderer": "16.11.0"
}
}

0 comments on commit 58d199d

Please sign in to comment.