Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[standards] Migrate "androidTest" JS from Haste to path-based requires #24813

Closed
wants to merge 1 commit into from

Conversation

ide
Copy link
Contributor

@ide ide commented May 11, 2019

Summary

The files in ReactAndroid/src/androidTest/js use Haste names; this commit migrates them to use path-based imports. This helps us move RN towards standard path-based requires. All the requires in androidTest have been rewritten to use relative requires.

Changelog

[General] [Changed] - Migrate "androidTest" JS from Haste to path-based requires

Test Plan

Run lint, Flow, and Android tests:

node cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests

Also run CI.

The files in `ReactAndroid/src/androidTest/js` use Haste names; this commit migrates them to use path-based imports. This helps us move RN towards standard path-based requires. All the requires in `androidTest` have been rewritten to use relative requires.

Test Plan: Run lint, Flow, and Android tests:

```
node cli.js bundle --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
buck install ReactAndroid/src/androidTest/buck-runner:instrumentation-tests
```
@ide ide requested a review from cpojer May 11, 2019 01:15
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner labels May 11, 2019
Copy link

@analysis-bot analysis-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code analysis results:

  • eslint found some issues. Run yarn lint --fix to automatically fix problems.

@react-native-bot react-native-bot added the Platform: Android Android applications. label May 11, 2019
@ide ide marked this pull request as ready for review May 11, 2019 01:30
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

const React = require('react');
const {NativeModules, Text} = require('react-native');

const {Recording: RecordingModule} = NativeModules;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be InitialPropsRecordingModule.

I am fixing it internally, just commenting here for posterity.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @ide in cd9adda.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label May 14, 2019
@ide ide deleted the standard-paths-androidtests branch May 14, 2019 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. p: Expo Partner: Expo Partner Platform: Android Android applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants