Remove unnecessary RobolectricTestRunner usage (#49290)

Summary:
Was going through some tests and I notice several files that use `RobolectricTestRunner` unnecessarily. This PR cleans that up.

## Changelog:

[INTERNAL] - Remove unnecessary RobolectricTestRunner usage

Pull Request resolved: https://github.com/facebook/react-native/pull/49290

Test Plan:
```
yarn test-android
```

Reviewed By: cipolleschi

Differential Revision: D69383948

Pulled By: cortinico

fbshipit-source-id: 6102319115240267ba83a086d03a850d1b7cdae5
This commit is contained in:
Mateo Guzmán
2025-02-10 02:32:12 -08:00
committed by Facebook GitHub Bot
parent c0415adb11
commit fd36a51456
10 changed files with 0 additions and 30 deletions
@@ -11,10 +11,7 @@ import okio.Buffer
import okio.ByteString
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class MultipartStreamReaderTest {
@Test
@@ -13,11 +13,8 @@ import com.facebook.react.common.annotations.UnstableReactNativeAPI
import com.facebook.react.interfaces.exceptionmanager.ReactJsExceptionHandler.*
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@OptIn(UnstableReactNativeAPI::class)
@RunWith(RobolectricTestRunner::class)
class StackTraceHelperTest {
@Test
fun testParseAlternateFormatStackFrameWithMethod() {
@@ -12,10 +12,7 @@ import java.nio.charset.StandardCharsets
import kotlin.math.min
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class ProgressiveStringDecoderTest {
private val TEST_DATA_1_BYTE =
@@ -12,14 +12,11 @@ import okhttp3.CookieJar
import okhttp3.HttpUrl
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.kotlin.any
import org.mockito.kotlin.mock
import org.mockito.kotlin.whenever
import org.robolectric.RobolectricTestRunner
/** Tests for {@link NetworkingModule}. */
@RunWith(RobolectricTestRunner::class)
class ReactCookieJarContainerTest {
private val httpUrl: HttpUrl = HttpUrl.Builder().host("example.com").scheme("http").build()
@@ -12,11 +12,8 @@ import kotlin.math.cos
import kotlin.math.sin
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
/** Test for [MatrixMathHelper] */
@RunWith(RobolectricTestRunner::class)
class MatrixMathHelperTest {
@Test
@@ -12,11 +12,8 @@ import com.facebook.react.uimanager.annotations.ReactProp
import com.facebook.react.uimanager.annotations.ReactPropGroup
import java.util.Date
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
/** Test that verifies that spec of methods annotated with @ReactProp is correct */
@RunWith(RobolectricTestRunner::class)
@Suppress("UNUSED_PARAMETER")
class ReactPropAnnotationSetterSpecTest {
private abstract inner class BaseViewManager : ViewManager<View, ReactShadowNode<*>>() {
@@ -10,10 +10,7 @@ package com.facebook.react.uimanager.layoutanimation
import java.util.Locale
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class InterpolatorTypeTest {
@Test
fun testCamelCase() {
@@ -11,10 +11,7 @@ import android.graphics.Shader.TileMode
import com.facebook.drawee.drawable.ScalingUtils
import org.assertj.core.api.Assertions
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class ImageResizeModeTest {
@Test
@@ -9,10 +9,7 @@ package com.facebook.react.views.text
import org.assertj.core.api.Assertions.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class TextTransformTest {
@Test
fun textTransformCapitalize() {
@@ -9,11 +9,8 @@ package com.facebook.react.views.view
import junit.framework.TestCase.assertEquals
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
/** Based on Fresco's DrawableUtilsTest (https://github.com/facebook/fresco). */
@RunWith(RobolectricTestRunner::class)
class ColorUtilTest {
@Test
fun testNormalize() {