mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add java and JS coverage collection to RNTester for Jest E2E (#44856)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44856 Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D58360098 fbshipit-source-id: dd06f9d3f2fe887cb9311ccfef811a2965ca5750
This commit is contained in:
committed by
Facebook GitHub Bot
parent
df35e258b2
commit
b44e3f69a4
+7
-1
@@ -7,9 +7,15 @@
|
||||
|
||||
package com.facebook.react
|
||||
|
||||
import android.app.Application
|
||||
import java.io.PrintWriter
|
||||
|
||||
object FBEndToEndDumpsysHelper {
|
||||
object FBRNTesterEndToEndHelper {
|
||||
fun onCreate(application: Application) {
|
||||
// no-op This is an empty implementation to stub out Meta's internal test coverage
|
||||
// instrumentation.
|
||||
}
|
||||
|
||||
fun maybeDump(prefix: String, writer: PrintWriter, args: Array<String>?) {
|
||||
// no-op This is an empty implementation to stub out Meta's internal dumpsys helper.
|
||||
}
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
package com.facebook.react.uiapp
|
||||
|
||||
import android.os.Bundle
|
||||
import com.facebook.react.FBEndToEndDumpsysHelper
|
||||
import com.facebook.react.FBRNTesterEndToEndHelper
|
||||
import com.facebook.react.ReactActivity
|
||||
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
|
||||
import com.facebook.react.defaults.DefaultReactActivityDelegate
|
||||
@@ -29,7 +29,7 @@ class RNTesterActivity : ReactActivity() {
|
||||
val routeUri = "rntester://example/${bundle.getString(PARAM_ROUTE)}Example"
|
||||
initialProps = Bundle().apply { putString("exampleFromAppetizeParams", routeUri) }
|
||||
}
|
||||
|
||||
FBRNTesterEndToEndHelper.onCreate(activity.application)
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ class RNTesterActivity : ReactActivity() {
|
||||
writer: PrintWriter,
|
||||
args: Array<String>?
|
||||
) {
|
||||
FBEndToEndDumpsysHelper.maybeDump(prefix, writer, args)
|
||||
FBRNTesterEndToEndHelper.maybeDump(prefix, writer, args)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user