From 1f03194e797bf5987c601094f3ad0afcbaea02f2 Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Mon, 11 Mar 2024 16:56:07 -0700 Subject: [PATCH] Fix Bridgeless React Context test in OSS (#43424) Summary: https://github.com/facebook/react-native/pull/43400/ caused a `getCatalystInstanceTest` to fail in OSS due to `bridgelessReactContext` not being a Mock object. Differential Revision: D54781539 --- .../com/facebook/react/runtime/BridgelessReactContextTest.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/runtime/BridgelessReactContextTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/runtime/BridgelessReactContextTest.kt index 6f7eb6f474aed9..a3bf2053394eda 100644 --- a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/runtime/BridgelessReactContextTest.kt +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/runtime/BridgelessReactContextTest.kt @@ -57,9 +57,7 @@ class BridgelessReactContextTest { @Test fun getCatalystInstanceTest() { - val bridgelessCatalystInstance = BridgelessCatalystInstance(reactHost) - doReturn(bridgelessCatalystInstance).`when`(bridgelessReactContext).getCatalystInstance() Assertions.assertThat(bridgelessReactContext.getCatalystInstance()) - .isEqualTo(bridgelessCatalystInstance) + .isInstanceOf(BridgelessCatalystInstance::class.java) } }