Skip to content

Commit 40f7005

Browse files
committed
add test for LayoutUpdate util methods
1 parent 7a16bc6 commit 40f7005

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: tests/test_core/test_layout.py

+6
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,16 @@
66
import pytest
77

88
import idom
9+
from idom.core.layout import LayoutUpdate
910

1011
from tests.general_utils import assert_same_items, HookCatcher
1112

1213

14+
def test_layout_update_create_from_apply_to():
15+
update = LayoutUpdate.create_from({"a": 1, "b": [1]}, {"a": 2, "b": [1, 2]})
16+
assert update.apply_to({"a": 1, "b": [1]}) == {"a": 2, "b": [1, 2]}
17+
18+
1319
def test_layout_repr():
1420
@idom.element
1521
def MyElement():

0 commit comments

Comments
 (0)