Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Track: HTTP client support on React Native for Android and iOS #3404

Closed
@acostalima

Description

@acostalima

HTTP client - January 18-29 ⌛

React Native Test Runner - January 4-8 ✅

A CLI tool in line of what @hugomrdias has done with playright-test but for React Native. The first version includes support for Zora test runner.

Repo: https://github.com/acostalima/react-native-test-runner

  • Concept validation: use React Native's bundler, Metro, to report test results from an iOS or Android app to a Node process.
  • Find iOS simulator by name and OS version
  • Start/stop headless iOS simulador
  • Install/launch iOS app on simulator
  • Build iOS app in debug mode programatically
    • Tools: xcodebuild, pod
    • Output binary location: ??
  • Metro bundler: server.close() hangs after an app connects to the server and then when it's terminated
  • Fix Zora's exports in package.json for React Native
  • Find Android emulator by name and OS version
  • Build Android app in debug mode programatically
    • Tools: gradlew
    • Output binary location: ??
  • Install/launch Android app on emulator
    • Tools: adb, emulator, avdmanager
  • Start/stop headless Android emulator
  • CLI
  • Tests
  • Add README
  • Setup CI pipeline in GitHub Actions
    • Android job
    • iOS job
    • Android cache
    • iOS cache
    • npm cache
  • Use react-native init to initialize a new React Native app instead and distributing it
    • When the test runner is installed as dev dependency, React Native itself and its dependencies may be hoisted
    • There are files in the Android and iOS projects that expect React Native, its CLI and Metro to be available at the top level node_modules directory by hardcoded relative path look ups (e.g. ../node_modules/react-native). As such, the Android and iOS projects cannot be packaged and released to npm.
    • Accept a CLI option to pass React Native semver to use
    • Create/delete RN test app directory
    • Make RN and Metro requires relative to RN's test app directory
    • Use default package name and bundle ID defined by react-native init for Android and iOS respectively to launch the apps
    • Check whether Babel config file needs to be copied to the RN test app's directory

References & Inspiration

Fetch API - January 8-15 ✅

Technical discussion: react-native-community/fetch#4

React Native - January 18-22 ⌛

Related work

Jet by Invertase

Jet lets you bring your React Native JS code into NodeJS and test it mock free and native testing code free - ideal for testing React Native modules e2e.

The developers behind React Native Firebase. Currently, the project is a PoC and does not have a dedicated GitHub repo.

Blob download/upload

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions