Skip to content

Commit 4e8e163

Browse files
committed
refactor
1 parent 845dfa7 commit 4e8e163

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

Package.resolved

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tests/CSS+PointFreeHTML Tests/Color Tests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ struct ColorTests {
2222
func htmlElementWithNamedColorRendersCorrectly() {
2323
assertInlineSnapshot(
2424
of: HTMLDocument {
25-
div.color(.red)
25+
div
26+
.color(.red)
2627
},
2728
as: .html
2829
) {

Tests/HTML+CSS+PointFreeHTML Tests/HTML+CSS+PointFree Tests.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,29 @@ struct Tests {
107107
"""
108108
}
109109
}
110+
111+
@Test("HTML element renders with named color properly")
112+
func htmlElementWithNamedColorRendersCorrectly() {
113+
assertInlineSnapshot(
114+
of: HTMLDocument {
115+
"Hello World"
116+
.color(.named(.red))
117+
},
118+
as: .html
119+
) {
120+
"""
121+
<!doctype html>
122+
<html lang="en">
123+
<head>
124+
<style>
125+
.color-dMYaj4{color:red}
126+
127+
</style>
128+
</head>
129+
<body>Hello World
130+
</body>
131+
</html>
132+
"""
133+
}
134+
}
110135
}

0 commit comments

Comments
 (0)