chore(react-native): fix sync-deps e2e tests (#12526)

- the npm package has to installed in order to sync in deps
This commit is contained in:
Emily Xiong 2022-10-11 14:50:45 -04:00 committed by GitHub
parent beb04e243d
commit abcae17fc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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': '*',
},
});
});