mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
c0415adb11
commit
fd36a51456
-3
@@ -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
|
||||
|
||||
-3
@@ -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() {
|
||||
|
||||
-3
@@ -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 =
|
||||
|
||||
-3
@@ -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()
|
||||
|
||||
|
||||
-3
@@ -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
|
||||
|
||||
-3
@@ -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<*>>() {
|
||||
|
||||
-3
@@ -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() {
|
||||
|
||||
-3
@@ -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
|
||||
|
||||
-3
@@ -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() {
|
||||
|
||||
-3
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user