Skip to content

Commit de78923

Browse files
committed
add test
1 parent 4c48cd1 commit de78923

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/src/DateTime.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ datetimeTest = describe "Data.Formatter.DateTime" do
4444
, { format: "hhmmssS", dateStr: "1112301", date: makeDateTime 2017 4 10 11 12 30 123 }
4545
, { format: "HHmmssSSS", dateStr: "134530123", date: makeDateTime 2017 4 10 13 45 30 123 }
4646
, { format: "HHmm", dateStr: "1345", date: makeDateTime 2017 4 10 13 45 30 123 }
47+
, { format: "X", dateStr: "1499779279", date: makeDateTime 2017 7 11 13 21 19 0 }
4748
]
4849
(\({ format, dateStr, date }) → do
4950
(format `FDT.formatDateTime` date) `shouldEqual` (Right dateStr)
@@ -89,6 +90,7 @@ datetimeTest = describe "Data.Formatter.DateTime" do
8990
, {date: "111230003", format: "hhmmssSSS"}
9091
, {date: "11123012", format: "hhmmssSS"}
9192
, {date: "1112301", format: "hhmmssS"}
93+
, {date: "1499779279", format: "X"}
9294

9395
]
9496
(\({date, format}) → (FDT.unformatDateTime format date >>= FDT.formatDateTime format) `shouldEqual` (Right date))

0 commit comments

Comments
 (0)