Skip to content

Commit 43009e4

Browse files
authored
fix strict eq effect test (#1170)
1 parent d6f9bfe commit 43009e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/py/reactpy/tests/test_core/test_hooks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ def SomeComponent():
12041204
@pytest.mark.parametrize("get_value", STRICT_EQUALITY_VALUE_CONSTRUCTORS)
12051205
async def test_use_effect_compares_with_strict_equality(get_value):
12061206
effect_count = reactpy.Ref(0)
1207-
value = reactpy.Ref("string")
1207+
value = reactpy.Ref(get_value())
12081208
hook = HookCatcher()
12091209

12101210
@reactpy.component
@@ -1217,7 +1217,7 @@ def incr_effect_count():
12171217
async with reactpy.Layout(SomeComponent()) as layout:
12181218
await layout.render()
12191219
assert effect_count.current == 1
1220-
value.current = "string" # new string instance but same value
1220+
value.current = get_value()
12211221
hook.latest.schedule_render()
12221222
await layout.render()
12231223
# effect does not trigger

0 commit comments

Comments
 (0)