From 1a5e880f5a93bfc0b629a3fc24fc57ada1c31a1f Mon Sep 17 00:00:00 2001 From: Konstantin Molchanov Date: Mon, 27 Mar 2017 21:14:02 +0400 Subject: [PATCH] Tests: Times: JS: Add test for yearday attribute. --- tests/js/ttimes.nim | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/js/ttimes.nim diff --git a/tests/js/ttimes.nim b/tests/js/ttimes.nim new file mode 100644 index 000000000..a39ebe0b3 --- /dev/null +++ b/tests/js/ttimes.nim @@ -0,0 +1,13 @@ +# test times module with js +discard """ + action: run +""" + +import times + +# $ date --date='@2147483647' +# Tue 19 Jan 03:14:07 GMT 2038 + +block yeardayTest: + # check if yearday attribute is properly set on TimeInfo creation + doAssert fromSeconds(2147483647).getGMTime().yearday == 0