Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

fix(revert): upgrade to latest react-navigation v4 #94

Merged
merged 1 commit into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 1 addition & 41 deletions examples/__tests__/react-navigation.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import '@testing-library/jest-native/extend-expect';
import React from 'react';
import { Button, Text, View } from 'react-native';
import { createAppContainer, withNavigation } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import { createStackNavigator, createAppContainer, withNavigation } from 'react-navigation';

import { render, fireEvent } from '../../src';

Expand All @@ -16,45 +15,6 @@ jest
BaseButton: View,
Directions: {},
};
})
.mock('react-native-reanimated', () => {
const View = require('react-native').View;

const Easing = {
linear: jest.fn(),
ease: jest.fn(),
quad: jest.fn(),
cubic: jest.fn(),
poly: jest.fn(),
sin: jest.fn(),
circle: jest.fn(),
exp: jest.fn(),
elastic: jest.fn(),
back: jest.fn(),
bounce: jest.fn(),
bezier: jest.fn(),
in: jest.fn(),
out: jest.fn(),
inOut: jest.fn(),
};

return {
Easing,
Value: jest.fn(),
event: jest.fn(),
add: jest.fn(),
eq: jest.fn(),
set: jest.fn(),
cond: jest.fn(),
interpolate: jest.fn(),
View: View,
Extrapolate: { CLAMP: jest.fn() },
Transition: {
Together: 'Together',
Out: 'Out',
In: 'In',
},
};
});

const Home = ({ navigation }) => (
Expand Down
2 changes: 1 addition & 1 deletion jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const jestPreset = require('react-native/jest-preset');
module.exports = Object.assign(jestPreset, {
transformIgnorePatterns: [
...jestPreset.transformIgnorePatterns,
'node_modules/(?!(react-native.*|@?react-navigation.*|@?react-native-community.*)/)',
'node_modules/(?!(react-native.*|@?react-navigation.*)/)',
],
snapshotSerializers: [require.resolve('./dist/preset/serializer.js')],
setupFiles: [...jestPreset.setupFiles, require.resolve('./dist/preset/setup.js')],
Expand Down
6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,15 @@
"jest-fetch-mock": "^2.1.1",
"jest-in-case": "^1.0.2",
"metro-react-native-babel-preset": "^0.52.0",
"react-native-safe-area-context": "0.6.1",
"@react-native-community/masked-view": "0.1.5",
"prettier": "^1.16.4",
"react-native-reanimated": "1.4.0",
"pretty-quick": "^1.10.0",
"react": "16.9.0",
"react-hooks-testing-library": "^0.5.0",
"react-intl": "^2.8.0",
"react-intl-native": "^2.1.2",
"react-native": "^0.61.1",
"react-native-gesture-handler": "^1.1.0",
"react-navigation": "4.0.10",
"react-navigation-stack": "2.0.0-alpha.38",
"react-navigation": "^3.5.1",
"react-redux": "^7.0.3",
"react-test-renderer": "16.9.0",
"redux": "^4.0.1",
Expand Down