Skip to content

Commit b44e3f6

Browse files
GijsWeteringsfacebook-github-bot
authored andcommitted
Add java and JS coverage collection to RNTester for Jest E2E (#44856)
Summary: Pull Request resolved: #44856 Changelog: [Internal] Reviewed By: fkgozali Differential Revision: D58360098 fbshipit-source-id: dd06f9d3f2fe887cb9311ccfef811a2965ca5750
1 parent df35e25 commit b44e3f6

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

packages/rn-tester/android/app/src/main/java/com/facebook/react/FBEndToEndDumpsysHelper.kt renamed to packages/rn-tester/android/app/src/main/java/com/facebook/react/FBRNTesterEndToEndHelper.kt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,15 @@
77

88
package com.facebook.react
99

10+
import android.app.Application
1011
import java.io.PrintWriter
1112

12-
object FBEndToEndDumpsysHelper {
13+
object FBRNTesterEndToEndHelper {
14+
fun onCreate(application: Application) {
15+
// no-op This is an empty implementation to stub out Meta's internal test coverage
16+
// instrumentation.
17+
}
18+
1319
fun maybeDump(prefix: String, writer: PrintWriter, args: Array<String>?) {
1420
// no-op This is an empty implementation to stub out Meta's internal dumpsys helper.
1521
}

packages/rn-tester/android/app/src/main/java/com/facebook/react/uiapp/RNTesterActivity.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
package com.facebook.react.uiapp
99

1010
import android.os.Bundle
11-
import com.facebook.react.FBEndToEndDumpsysHelper
11+
import com.facebook.react.FBRNTesterEndToEndHelper
1212
import com.facebook.react.ReactActivity
1313
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled
1414
import com.facebook.react.defaults.DefaultReactActivityDelegate
@@ -29,7 +29,7 @@ class RNTesterActivity : ReactActivity() {
2929
val routeUri = "rntester://example/${bundle.getString(PARAM_ROUTE)}Example"
3030
initialProps = Bundle().apply { putString("exampleFromAppetizeParams", routeUri) }
3131
}
32-
32+
FBRNTesterEndToEndHelper.onCreate(activity.application)
3333
super.onCreate(savedInstanceState)
3434
}
3535

@@ -47,6 +47,6 @@ class RNTesterActivity : ReactActivity() {
4747
writer: PrintWriter,
4848
args: Array<String>?
4949
) {
50-
FBEndToEndDumpsysHelper.maybeDump(prefix, writer, args)
50+
FBRNTesterEndToEndHelper.maybeDump(prefix, writer, args)
5151
}
5252
}

0 commit comments

Comments
 (0)