diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/ReactActivityDelegateTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/ReactActivityDelegateTest.kt index dcf9da8ed02..2912a9c1936 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/ReactActivityDelegateTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/ReactActivityDelegateTest.kt @@ -7,6 +7,7 @@ package com.facebook.react +import android.app.Activity import android.os.Bundle import org.junit.Assert.* import org.junit.Test @@ -16,10 +17,12 @@ import org.robolectric.RobolectricTestRunner @RunWith(RobolectricTestRunner::class) class ReactActivityDelegateTest { + val nullDelegate: Activity? = null + @Test fun delegateWithFabricEnabled_populatesInitialPropsCorrectly() { val delegate = - object : ReactActivityDelegate(null, "test-delegate") { + object : ReactActivityDelegate(nullDelegate, "test-delegate") { override fun isFabricEnabled() = true public val inspectLaunchOptions: Bundle? get() = composeLaunchOptions() @@ -33,7 +36,7 @@ class ReactActivityDelegateTest { @Test fun delegateWithoutFabricEnabled_hasNullInitialProperties() { val delegate = - object : ReactActivityDelegate(null, "test-delegate") { + object : ReactActivityDelegate(nullDelegate, "test-delegate") { override fun isFabricEnabled() = false public val inspectLaunchOptions: Bundle? get() = composeLaunchOptions() @@ -45,7 +48,7 @@ class ReactActivityDelegateTest { @Test fun delegateWithFabricEnabled_composesInitialPropertiesCorrectly() { val delegate = - object : ReactActivityDelegate(null, "test-delegate") { + object : ReactActivityDelegate(nullDelegate, "test-delegate") { override fun isFabricEnabled() = true override fun getLaunchOptions(): Bundle = Bundle().apply { putString("test-property", "test-value") }