Skip to content

Add tests for React Native 0.79 #481

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -308,16 +308,16 @@ workflows:
- lint
- test-js
- test-ios:
name: test-ios-0.78
react-native-version: '0.78'
name: test-ios-0.79
react-native-version: '0.79'
xcode-version: 16.2.0
requires:
- lint
- test-js
- test-android:
matrix:
parameters:
react-native-version: ['0.68', '0.72', '0.78']
react-native-version: ['0.68', '0.72', '0.79']
requires:
- lint
- test-js
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
presets: ['module:@react-native/babel-preset'],
};
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,25 @@
"whatwg-url-without-unicode": "8.0.0-3"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.25.0",
"@react-native-community/eslint-config": "3.2.0",
"@react-native/babel-preset": "0.79.0",
"@types/node": "^22.13.10",
"detox": "20.34.5",
"eslint": "8.56.0",
"eslint-plugin-ft-flow": "^3.0.11",
"eslint-plugin-prettier": "5.1.1",
"husky": "8.0.3",
"jest": "29.7.0",
"lint-staged": "15.2.0",
"metro-react-native-babel-preset": "0.76.7",
"nanoid": "3.3.7",
"prettier": "3.1.1",
"react": "19.0.0",
"react-native": "0.78.0",
"react-native": "0.79.0",
"react-native-bundle-scale": "1.1.0",
"typescript": "5.8.2"
"typescript": "5.8.3"
},
"peerDependencies": {
"react-native": "*"
Expand Down
Binary file not shown.
30 changes: 0 additions & 30 deletions platforms/react-native/0.78/ios/Detox/AppDelegate.swift

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1'
gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0'
gem 'xcodeproj', '< 1.26.0'
gem 'concurrent-ruby', '< 1.3.4'

# Ruby 3.4.0 has removed some libraries from the standard library.
gem 'bigdecimal'
gem 'logger'
gem 'benchmark'
gem 'mutex_m'
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
Expand Down
48 changes: 48 additions & 0 deletions platforms/react-native/0.79/ios/Detox/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import UIKit
import React
import React_RCTAppDelegate
import ReactAppDependencyProvider

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

var reactNativeDelegate: ReactNativeDelegate?
var reactNativeFactory: RCTReactNativeFactory?

func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
) -> Bool {
let delegate = ReactNativeDelegate()
let factory = RCTReactNativeFactory(delegate: delegate)
delegate.dependencyProvider = RCTAppDependencyProvider()

reactNativeDelegate = delegate
reactNativeFactory = factory

window = UIWindow(frame: UIScreen.main.bounds)

factory.startReactNative(
withModuleName: "Detox",
in: window,
launchOptions: launchOptions
)

return true
}
}

class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
override func sourceURL(for bridge: RCTBridge) -> URL? {
self.bundleURL()
}

override func bundleURL() -> URL? {
#if DEBUG
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
#else
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
#endif
}
}
Loading