From abcae17fc265b14c29f07ac1a47eaa8216f13d71 Mon Sep 17 00:00:00 2001 From: Emily Xiong Date: Tue, 11 Oct 2022 14:50:45 -0400 Subject: [PATCH] chore(react-native): fix sync-deps e2e tests (#12526) - the npm package has to installed in order to sync in deps --- e2e/react-native/src/react-native.test.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/react-native/src/react-native.test.ts b/e2e/react-native/src/react-native.test.ts index a87720722a..705d46d883 100644 --- a/e2e/react-native/src/react-native.test.ts +++ b/e2e/react-native/src/react-native.test.ts @@ -141,11 +141,11 @@ describe('react native', () => { }); // Add import for Nx to pick up updateFile(join('apps', appName, 'src/app/App.tsx'), (content) => { - return `import { launchImageLibrary } from 'react-native-image-picker';\n${content}`; + return `import AsyncStorage from '@react-native-async-storage/async-storage';import Config from 'react-native-config';\n${content}`; }); await runCLIAsync( - `sync-deps ${appName} --include=react-native-gesture-handler,react-native-safe-area-context` + `sync-deps ${appName} --include=react-native-gesture-handler,react-native-safe-area-context,react-native-image-picker` ); const result = readJson(join('apps', appName, 'package.json')); @@ -154,6 +154,9 @@ describe('react native', () => { 'react-native-image-picker': '*', 'react-native-gesture-handler': '*', 'react-native-safe-area-context': '*', + 'react-native': '*', + 'react-native-config': '*', + '@react-native-async-storage/async-storage': '*', }, }); });