mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Enable mock-maker-inline for Android JVM tests (#37646)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37646 I'm re-enabling a test that got disabled due to us not using mock-maker-inline in OSS. I'm also adding `mock-maker-inline` for OSS so it will be easier to convert tests to Kotlin as classes in Kotlin are final by default. Changelog: [Internal] [Changed] - Enable mock-maker-inline for Android JVM tests Reviewed By: NickGerleman Differential Revision: D46222913 fbshipit-source-id: b7da0616994888c2800c193a1bb8e233d2c18288
This commit is contained in:
committed by
Facebook GitHub Bot
parent
462c648b58
commit
ddb8aeadbb
-2
@@ -14,7 +14,6 @@ import com.facebook.react.defaults.DefaultReactHostDelegate
|
||||
import com.facebook.react.turbomodule.core.TurboModuleManagerDelegate
|
||||
import com.facebook.testutils.shadows.ShadowSoLoader
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.mockito.Mockito
|
||||
@@ -31,7 +30,6 @@ class ReactHostDelegateTest {
|
||||
* API
|
||||
*/
|
||||
@Test
|
||||
@Ignore
|
||||
fun testDefaultReactHostDelegateCreation() {
|
||||
val jsBundleLoader: JSBundleLoader = Mockito.mock(JSBundleLoader::class.java)
|
||||
val turboModuleManagerDelegateMock: TurboModuleManagerDelegate =
|
||||
|
||||
+2
-1
@@ -126,7 +126,8 @@ public class DeviceInfoModuleTest extends TestCase {
|
||||
}
|
||||
|
||||
private static void givenDisplayMetricsHolderContains(final WritableMap fakeDisplayMetrics) {
|
||||
when(DisplayMetricsHolder.getDisplayMetricsWritableMap(1.0)).thenReturn(fakeDisplayMetrics);
|
||||
when(DisplayMetricsHolder.getDisplayMetricsWritableMap(1.0))
|
||||
.thenAnswer(invocation -> fakeDisplayMetrics);
|
||||
}
|
||||
|
||||
private static void verifyUpdateDimensionsEventsEmitted(
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
mock-maker-inline
|
||||
Reference in New Issue
Block a user