Skip to content

Commit

Permalink
fix strict eq effect test (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmorshea authored Dec 10, 2023
1 parent d6f9bfe commit 43009e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/py/reactpy/tests/test_core/test_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,7 @@ def SomeComponent():
@pytest.mark.parametrize("get_value", STRICT_EQUALITY_VALUE_CONSTRUCTORS)
async def test_use_effect_compares_with_strict_equality(get_value):
effect_count = reactpy.Ref(0)
value = reactpy.Ref("string")
value = reactpy.Ref(get_value())
hook = HookCatcher()

@reactpy.component
Expand All @@ -1217,7 +1217,7 @@ def incr_effect_count():
async with reactpy.Layout(SomeComponent()) as layout:
await layout.render()
assert effect_count.current == 1
value.current = "string" # new string instance but same value
value.current = get_value()
hook.latest.schedule_render()
await layout.render()
# effect does not trigger
Expand Down

0 comments on commit 43009e4

Please sign in to comment.