Add unit tests for the new AttributedStringBuilder, initially as a copy of the old ones.

This commit is contained in:
Stefan Ceriu
2025-08-27 13:16:42 +03:00
committed by Doug
parent 3ac201ea2c
commit 3370f3906e
3 changed files with 1103 additions and 18 deletions
@@ -8,10 +8,14 @@
@testable import ElementX
import XCTest
class AttributedStringBuilderTests: XCTestCase {
private lazy var attributedStringBuilder = AttributedStringBuilder(mentionBuilder: MentionBuilder())
class AttributedStringBuilderV1Tests: XCTestCase {
private var attributedStringBuilder: AttributedStringBuilder!
private let maxHeaderPointSize = ceil(UIFont.preferredFont(forTextStyle: .body).pointSize * 1.2)
override func setUp() async throws {
attributedStringBuilder = AttributedStringBuilder(mentionBuilder: MentionBuilder())
}
func testRenderHTMLStringWithHeaders() {
let h1HTMLString = "<h1>Large Heading</h1>"
let h2HTMLString = "<h2>Smaller Heading</h2>"
File diff suppressed because it is too large Load Diff