mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
f645404f5c
Summary: This PR is part of https://github.com/facebook/react-native/issues/34872 This PR extracts `UnsupportedModulePropertyParserError` exception to `throwIfModuleTypeIsUnsupported` function inside `error-utils.js` file ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Internal] [Changed] - Extract `UnsupportedModulePropertyParserError` to `throwIfModuleTypeIsUnsupported` function inside `error-utils.js` Pull Request resolved: https://github.com/facebook/react-native/pull/34966 Test Plan: `yarn jest react-native-codegen` Added unit case in `error-utils-test.js` file <img width="939" alt="Screenshot 2022-10-13 at 12 14 19 PM" src="https://user-images.githubusercontent.com/86604753/195521643-6a197b51-7038-48f1-8b92-2c8c2786d66b.png"> Reviewed By: christophpurrer Differential Revision: D40337936 Pulled By: cipolleschi fbshipit-source-id: 74fb116b48634c5e3b6c11f8b71ad59f290d959e
react-native-codegen
Installation
yarn add --dev react-native-codegen
Note: We're using yarn to install deps. Feel free to change commands to use npm 3+ and npx if you like
Testing
To run the tests in this package, run the following commands from the react Native root folder:
yarnto install the dependencies. You just need to run this onceyarn jest react-native-codegen.