Skip to content

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

Closed
ide wants to merge 1 commit into
react:masterfrom
expo:standard-paths-androidtests
Closed

[standards] Migrate "androidTest" JS from Haste to path-based requires#24813
ide wants to merge 1 commit into
react:masterfrom
expo:standard-paths-androidtests

Conversation

@ide

@ide ide commented May 11, 2019

Copy link
Copy Markdown
Contributor

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

@analysis-bot analysis-bot left a comment

Copy link
Copy Markdown

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.

Comment thread ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js
Comment thread ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js
Comment thread ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js
Comment thread ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js
@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

@cpojer cpojer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice!

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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