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:

#43400 caused a `getCatalystInstanceTest` to fail in OSS due to `bridgelessReactContext` not being a Mock object.

Reviewed By: fkgozali

Differential Revision: D54781539
  • Loading branch information
arushikesarwani94 authored and facebook-github-bot committed Mar 12, 2024
1 parent 5522d52 commit 534b594
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
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 534b594

Please sign in to comment.