Skip to content

Commit d03981b

Browse files
committed
Add test for #23. Closes #23.
1 parent 4bcad29 commit d03981b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tdom/processor_test.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,3 +561,13 @@ def Wrapper(
561561
str(node)
562562
== '<div id="comp1" data-first="1" data-second="99" class="wrapped">Component: <p>Inside wrapper</p></div>'
563563
)
564+
565+
566+
def test_nested_component_gh23():
567+
# See https://github.com/t-strings/tdom/issues/23 for context
568+
def Header():
569+
return html(t"{'Hello World'}")
570+
571+
node = html(t"<{Header} />")
572+
assert node == Text("Hello World")
573+
assert str(node) == "Hello World"

0 commit comments

Comments
 (0)