Skip to content

Commit

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

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

Differential Revision: D54781539
  • Loading branch information
arushikesarwani94 authored and facebook-github-bot committed Mar 11, 2024
1 parent 86a52cc commit 1f03194
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 1f03194

Please sign in to comment.