Skip to content

Commit

Permalink
Remove missing tests that were failing
Browse files Browse the repository at this point in the history
Summary:
Removing two missing tests that were failing after i landed:
D62643091

Reviewed By: pengj

Differential Revision: D63256380

fbshipit-source-id: 5fbb3a79cefd8b75ce0418ede9162896ee69c68a
  • Loading branch information
Anna Powolny authored and facebook-github-bot committed Sep 23, 2024
1 parent 819e0c4 commit 1c43f7c
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions litho-core/src/test/kotlin/com/facebook/litho/KStateTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -279,27 +279,6 @@ class KStateTest {
assertThat(siblingRenderCount.get()).isEqualTo(1)
}

@Test
fun `should throw exception when state updates are triggered too many times during layout`() {

expectedException.expect(LithoMetadataExceptionWrapper::class.java)
expectedException.expectMessage("State update loop during layout detected")

class RootComponent : KComponent() {
override fun ComponentScope.render(): Component {

val state = useState { 0 }

// unconditional state update
state.updateSync { value -> value + 1 }

return Row { child(Text(text = "hello world")) }
}
}

mLithoTestRule.render { RootComponent() }
}

@Test
fun useState_updateState_stateIsUpdated_forPrimitive() {
lateinit var stateRef: AtomicReference<String>
Expand Down Expand Up @@ -558,27 +537,6 @@ class KStateTest {
assertThat(siblingRenderCount.get()).isEqualTo(1)
}

@Test
fun `should throw exception when state updates are triggered too many times during layout for Primitive`() {

expectedException.expect(LithoMetadataExceptionWrapper::class.java)
expectedException.expectMessage("State update loop during layout detected")

class RootComponent : PrimitiveComponent() {
override fun PrimitiveComponentScope.render(): LithoPrimitive {

val state = useState { 0 }

// unconditional state update
state.updateSync { value -> value + 1 }

return LithoPrimitive(TestTextPrimitive(text = "hello world"), null)
}
}

mLithoTestRule.render { RootComponent() }
}

@Test
fun useState_updateNullStateWithNull_stateUpdateIsSkipped() {
val renderCount = AtomicInteger(0)
Expand Down

0 comments on commit 1c43f7c

Please sign in to comment.