From f26925a6e1ff9547bc4caf43db207bc83a565404 Mon Sep 17 00:00:00 2001 From: Brandon Carroll Date: Wed, 11 Dec 2019 11:41:40 -0500 Subject: [PATCH] Revert "chore(navigation): upgrade to latest react-navigation v4 (#90)" This reverts commit 065e5f8ad48f3d6a004f94d28dc55c21c2077c4b. --- examples/__tests__/react-navigation.js | 42 +------------------------- jest-preset.js | 2 +- package.json | 6 +--- 3 files changed, 3 insertions(+), 47 deletions(-) diff --git a/examples/__tests__/react-navigation.js b/examples/__tests__/react-navigation.js index ace2ab7..1be2baa 100644 --- a/examples/__tests__/react-navigation.js +++ b/examples/__tests__/react-navigation.js @@ -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'; @@ -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 }) => ( diff --git a/jest-preset.js b/jest-preset.js index 3d4ea40..5789b3c 100644 --- a/jest-preset.js +++ b/jest-preset.js @@ -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')], diff --git a/package.json b/package.json index f61481b..8a3e201 100644 --- a/package.json +++ b/package.json @@ -55,10 +55,7 @@ "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", @@ -66,8 +63,7 @@ "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",