Skip to content

Commit 4585c37

Browse files
committed
Attempt to fix format tests
1 parent b0451c8 commit 4585c37

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/RenderingTests/TextTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,14 @@ This is some markdown text [click me](apple.com)
9696
}
9797

9898
func testFormat() throws {
99-
try assertMatch(#"<text format="date-time" value="2023-01-17" />"#) {
100-
Text(Date(timeIntervalSince1970: 1673931600.0), format: .dateTime)
99+
try assertMatch(#"<text format="date-time" value="0001-01-01T00:00:00.000Z" />"#) {
100+
Text(Date.distantPast, format: .dateTime)
101101
}
102102
try assertMatch(#"<text format="url">apple.com</text>"#) {
103103
Text(URL(string: "apple.com")!, format: .url)
104104
}
105-
try assertMatch(#"<text format="iso8601" value="2023-01-17T14:55:01.326Z" />"#) {
106-
Text(Date(timeIntervalSince1970: 1673967301.325973), format: .iso8601)
105+
try assertMatch(#"<text format="iso8601" value="0001-01-01T00:00:00.000Z" />"#) {
106+
Text(Date.distantPast, format: .iso8601)
107107
}
108108
try assertMatch(#"<text format="number" value="0.42" />"#) {
109109
Text(0.42, format: .number)

0 commit comments

Comments
 (0)