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]

Reviewed By: fkgozali

Differential Revision: D58360098

fbshipit-source-id: dd06f9d3f2fe887cb9311ccfef811a2965ca5750
  • Loading branch information
GijsWeterings authored and facebook-github-bot committed Jun 12, 2024
1 parent df35e25 commit b44e3f6
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 b44e3f6

Please sign in to comment.