diff --git a/Tests/PlotTests/HTMLComponentTests.swift b/Tests/PlotTests/HTMLComponentTests.swift index 42dd660..0958d14 100644 --- a/Tests/PlotTests/HTMLComponentTests.swift +++ b/Tests/PlotTests/HTMLComponentTests.swift @@ -572,4 +572,26 @@ final class HTMLComponentTests: XCTestCase { """) } + + func testTableWithHeadersAndCells() { + let html = Table { + TableRow { + TableHeaderCell("Header one") + TableHeaderCell("Header two") + } + + TableRow { + TableCell("Cell one") + TableCell("Cell two") + } + } + .render() + + XCTAssertEqual(html, """ + \ + \ + \ +
Header oneHeader two
Cell oneCell two
+ """) + } }