Skip to content

Commit

Permalink
Test empty style prevention (#15)
Browse files Browse the repository at this point in the history
* Update SwiftHtmlTests.swift
  • Loading branch information
bgisme authored Feb 21, 2022
1 parent 2ce3194 commit 8facd3e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Tests/SwiftHtmlTests/SwiftHtmlTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ final class SwiftHtmlTests: XCTestCase {
XCTAssertEqual(#"<span class="a c"></span>"#, html)
}

func testSetEmptyStyle() {
let doc = Document {
Span("")
.style("")
}
let html = DocumentRenderer(minify: true).render(doc)
XCTAssertEqual(#"<span></span>"#, html)
}

func testTextTag() {
let doc = Document() {
P {
Expand Down

0 comments on commit 8facd3e

Please sign in to comment.