Skip to content

Commit

Permalink
added attribute formatting test
Browse files Browse the repository at this point in the history
  • Loading branch information
sliemeobn committed Jun 19, 2024
1 parent 4b6bf25 commit 207e24d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Tests/ElementaryTests/FormattedRenderingTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,20 @@ final class FormatedRenderingTests: XCTestCase {
"""
)
}

func testFormatsAttributes() {
HtmlFormattedAssertEqual(
div(.id("1")) {
"Hello "
span(.class("foo")) { "World" }
p(.class("bar")) { "!" }
},
"""
<div id="1">
Hello <span class="foo">World</span>
<p class="bar">!</p>
</div>
"""
)
}
}

0 comments on commit 207e24d

Please sign in to comment.