Skip to content

Move RN iOS tests into XcodeGen integration app#322

Open
kieran-osgood-shopify wants to merge 1 commit into
mainfrom
kieran-osgood/cx-expo-prebuild/rct-integration-tests
Open

Move RN iOS tests into XcodeGen integration app#322
kieran-osgood-shopify wants to merge 1 commit into
mainfrom
kieran-osgood/cx-expo-prebuild/rct-integration-tests

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Stack Context

This is the first PR in a two-PR stack that separates React Native iOS test relocation from the Expo sample migration.
The idea here is to re-locate the test scheme so it's not coupled to the "sample" app
Migrating to expo leads to deleting the ios directory, so we want the ios test scheme to become stand alone

image

Stack:

  1. Move React Native iOS bridge tests into an XcodeGen/CocoaPods integration app.
  2. Migrate the React Native sample to Expo prebuild/dev-client.

What?

  • Adds platforms/react-native/test/rct-integration-app as a small XcodeGen-generated CocoaPods host app for RN iOS tests.
  • Moves the RN iOS bridge/view tests out of the generated sample iOS project and into the new integration app.
  • Moves the protocol relay tests into the same RN iOS test target and removes the separate nested SwiftPM test package.
  • Extends platforms/swift/Scripts/generate_xcode_projects so dev up generates the RN RCT integration app through the existing XcodeGen pipeline.
  • Updates dev rn test ios to run the Xcode/CocoaPods integration tests.

Why?

The Expo migration deletes the committed generated React Native sample native projects. Before that happens, the RN-specific iOS behavioral coverage needs a stable home that is not inside generated sample output.

This keeps the tests running against the real React Native/CocoaPods integration until React Native SPM support is ready.

Validation

  • dev rn test ios
  • dev rn test js
  • dev rn lint
  • git diff --check

Copy link
Copy Markdown
Contributor Author

@Suite("Protocol Relay Tests")
struct ProtocolRelayTests {
@Test func envelopeEncodesTypeAndWireCasePayload() throws {
final class ProtocolRelayTests: XCTestCase {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All the other tests are in XCTest so this just aligns it to the same test approach as other test files

@kieran-osgood-shopify kieran-osgood-shopify marked this pull request as ready for review June 24, 2026 10:05
@kieran-osgood-shopify kieran-osgood-shopify requested a review from a team as a code owner June 24, 2026 10:05
@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.66% (319/348) 87.86% (181/206) 100% (82/82)

@github-actions

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
React Native npm tarball 90.9 KiB 90.9 KiB 0 B

Measured from the PR base SHA and PR head SHA. This comment reports package artifact sizes only; it is not a final app binary-size report.

@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/cx-expo-prebuild/rct-integration-tests branch 2 times, most recently from 81055f9 to 308872e Compare June 24, 2026 11:20
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/cx-expo-prebuild/rct-integration-tests branch from 308872e to b129eb3 Compare June 24, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant