Skip to content

Commit

Permalink
Fix Bridgeless React Context test in OSS (#43424)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #43424

#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
  • Loading branch information
arushikesarwani94 authored and facebook-github-bot committed Mar 12, 2024
1 parent 5522d52 commit bdca260
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -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)
}
}

0 comments on commit bdca260

Please sign in to comment.