Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update custom "exports" conditions in Jest environment
Summary: Updates the default set of `"exports"` condition names in our `ReactNativeEnv` for Jest, so that it aligns with the defaults in React Native CLI (react-native-community/cli#1862). Also includes a subtle update to how this is accomplished. Instead of overriding `exportConditions()`, we assign to the underlying class property — this allows users (once jestjs/jest#13989 is merged) to override `customExportConditions` via [`testEnvironmentOptions`](https://jestjs.io/docs/configuration#testenvironmentoptions-object). ```js preset: 'react-native', testEnvironmentOptions: { customExportConditions: ['test', 'react-native'], }, ``` Changelog: [Internal] Reviewed By: jacdebug Differential Revision: D43879056 fbshipit-source-id: 86fffe2b5fdf9d8492d25b8b12a78be75b5fa3be
- Loading branch information