Skip to content

Commit

Permalink
Add java and JS coverage collection to RNTester for Jest E2E (#44856)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44856

Changelog: [Internal]

Differential Revision: D58360098
  • Loading branch information
GijsWeterings authored and facebook-github-bot committed Jun 12, 2024
1 parent 33aa83a commit 2f96d6c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}

Expand All @@ -47,6 +47,6 @@ class RNTesterActivity : ReactActivity() {
writer: PrintWriter,
args: Array<String>?
) {
FBEndToEndDumpsysHelper.maybeDump(prefix, writer, args)
FBRNTesterEndToEndHelper.maybeDump(prefix, writer, args)
}
}

0 comments on commit 2f96d6c

Please sign in to comment.