From bdca2606797f50f9ccb064bc7b25cd849ffe5e6c Mon Sep 17 00:00:00 2001 From: Arushi Kesarwani Date: Mon, 11 Mar 2024 23:21:05 -0700 Subject: [PATCH] Fix Bridgeless React Context test in OSS (#43424) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/43424 https://github.com/facebook/react-native/pull/43400/ caused a `getCatalystInstanceTest` to fail in OSS due to `bridgelessReactContext` not being a Mock object. Reviewed By: fkgozali Differential Revision: D54781539 fbshipit-source-id: 1c784804c31d4b57fe438d49f3ee3eb7034dd7a6 --- .../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) } }